This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update jest to v27, as well as misc dependencies (#271)
* fix: do not fail on missing screenshot (#272) * refactor: readme, improved local commands (#276) BREAKING CHANGE: Update to Jest 27
- Loading branch information
Noah
authored
Apr 5, 2022
1 parent
5650b7a
commit a6ed950
Showing
82 changed files
with
9,943 additions
and
23,292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
end_of_line = lf | ||
max_line_length = off | ||
|
||
[*.yml] | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
[{CHANGELOG.md,package.json,yarn.lock}] | ||
indent_size = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
website | ||
!.eslintrc.js | ||
node_modules | ||
.yarn | ||
dist | ||
/output | ||
|
||
**/.* | ||
**/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['@tophat/eslint-config/base', '@tophat/eslint-config/jest'], | ||
rules: { | ||
'prettier/prettier': [ | ||
'error', | ||
{ | ||
printWidth: 100, | ||
tabWidth: 4, | ||
semi: false, | ||
trailingComma: 'all' /* Reduces git diff. */, | ||
singleQuote: true, | ||
arrowParens: 'always', // Reduces character diff when adding Typescript types. | ||
}, | ||
], | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'no-empty': ['error', { allowEmptyCatch: true }] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,33 +4,48 @@ on: | |
push: | ||
branches: | ||
- master | ||
- next | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
CI: 1 | ||
|
||
jobs: | ||
client: | ||
static-analysis: | ||
if: "!contains(github.event.head_commit.message, 'skip ci')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/detect-env | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v3.0.0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Restore node modules cache | ||
id: node-modules-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ./client/node_modules | ||
key: ${{ env.NODE_VERSION }}-${{ hashFiles('./client/yarn.lock') }} | ||
- name: lint client | ||
uses: ./.github/actions/lint | ||
path: ./node_modules | ||
key: ${{ env.NODE_VERSION }}-${{ hashFiles('yarn.lock') }} | ||
- name: Lint | ||
run: make lint | ||
client: | ||
if: "!contains(github.event.head_commit.message, 'skip ci')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/detect-env | ||
- name: Setup Node.js | ||
uses: actions/[email protected] | ||
with: | ||
project: client | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Restore node modules cache | ||
id: node-modules-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ./node_modules | ||
key: ${{ env.NODE_VERSION }}-${{ hashFiles('yarn.lock') }} | ||
- name: build client | ||
uses: ./.github/actions/build | ||
with: | ||
|
@@ -55,19 +70,15 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/detect-env | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v3.0.0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Restore node modules cache | ||
id: node-modules-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ./service/node_modules | ||
key: ${{ env.NODE_VERSION }}-${{ hashFiles('./service/yarn.lock') }} | ||
- name: lint service | ||
uses: ./.github/actions/lint | ||
with: | ||
project: service | ||
path: ./node_modules | ||
key: ${{ env.NODE_VERSION }}-${{ hashFiles('yarn.lock') }} | ||
- name: build service | ||
uses: ./.github/actions/build | ||
with: | ||
|
@@ -84,7 +95,7 @@ jobs: | |
service/artifacts/build | ||
docker-cache | ||
release-dry-run: | ||
if: (github.ref != 'refs/heads/master') && (!contains(github.event.head_commit.message, 'skip ci')) | ||
if: (github.ref != 'refs/heads/master') && (github.ref != 'refs/heads/next') && (!contains(github.event.head_commit.message, 'skip ci')) | ||
needs: [service, client] | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -102,7 +113,7 @@ jobs: | |
- name: Load Docker Container | ||
run: docker load < service/artifacts/build/docker-cache/sanity-service-docker.tar | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v3.0.0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Restore node modules cache | ||
|
@@ -121,9 +132,68 @@ jobs: | |
DOCKER_USERNAME: ${{ github.actor }} | ||
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
GH_TOKEN: ${{ secrets.TOPHAT_BOT_GH_TOKEN }} | ||
prerelease: | ||
if: github.ref == 'refs/heads/next' && (!contains(github.event.head_commit.message, 'skip ci')) | ||
needs: [static-analysis, service, client] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.TOPHAT_BOT_GH_TOKEN }} | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: service-artifacts | ||
path: service/artifacts/build | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: client-artifacts | ||
path: client/bin | ||
- name: Load Docker Container | ||
run: docker load < client/bin/docker-cache/sanity-docker-client.tar | ||
- name: Load Docker Container | ||
run: docker load < service/artifacts/build/docker-cache/sanity-service-docker.tar | ||
- name: Setup Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Restore node modules cache | ||
id: node-modules-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ./node_modules | ||
key: ${{ env.NODE_VERSION }}-${{ hashFiles('yarn.lock') }} | ||
- name: install dependencies | ||
run: make install | ||
- name: package artifacts | ||
run: make create-release-package | ||
- name: Login to GHCR | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: run release dry run | ||
run: | | ||
make deploy-prerelease-dry | ||
env: | ||
GH_TOKEN: ${{ secrets.TOPHAT_BOT_GH_TOKEN }} | ||
- name: Configure Git | ||
run: | | ||
git config --global user.name tophat-opensource-bot | ||
git config --global user.email [email protected] | ||
git config --global init.defaultBranch main | ||
- name: run release | ||
run: | | ||
make deploy-prerelease | ||
env: | ||
GH_TOKEN: ${{ secrets.TOPHAT_BOT_GH_TOKEN }} | ||
- name: Publish the service image to GHCR | ||
run: make -C service publish-docker-prerelease | ||
- name: Publish the client image to GHCR | ||
run: make -C client publish-docker-prerelease | ||
release: | ||
if: (github.ref == 'refs/heads/master') && (!contains(github.event.head_commit.message, 'skip ci')) | ||
needs: [service, client] | ||
if: github.ref == 'refs/heads/master' && (!contains(github.event.head_commit.message, 'skip ci')) | ||
needs: [static-analysis, service, client] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -142,7 +212,7 @@ jobs: | |
- name: Load Docker Container | ||
run: docker load < service/artifacts/build/docker-cache/sanity-service-docker.tar | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v3.0.0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Restore node modules cache | ||
|
@@ -155,8 +225,7 @@ jobs: | |
run: make install | ||
- name: package artifacts | ||
run: make create-release-package | ||
- | ||
name: Login to GHCR | ||
- name: Login to GHCR | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
|
@@ -191,15 +260,15 @@ jobs: | |
persist-credentials: false | ||
- uses: ./.github/actions/detect-env | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v3.0.0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Restore node modules cache | ||
id: node-modules-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ./website/node_modules | ||
key: ${{ env.NODE_VERSION }}-${{ hashFiles('./website/yarn.lock') }} | ||
path: ./node_modules | ||
key: ${{ env.NODE_VERSION }}-${{ hashFiles('yarn.lock') }} | ||
- name: Install dependencies | ||
if: steps.node-modules-cache.outputs.cache-hit != 'true' | ||
run: yarn install --frozen-lockfile | ||
|
Oops, something went wrong.