-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add lint & typecheck to github action change check
- Loading branch information
Showing
2 changed files
with
54 additions
and
24 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 |
---|---|---|
@@ -1,28 +1,59 @@ | ||
name: Test changes | ||
on: | ||
push: | ||
pull_request: | ||
|
||
env: | ||
PRIMARY_NODEJS_VERSION: 22 | ||
|
||
name: Cypress tests | ||
on: [push] | ||
jobs: | ||
cypress-run: | ||
name: Cypress run | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
cypress-run: | ||
name: Cypress run | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup node ${{ env.PRIMARY_NODEJS_VERSION }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.PRIMARY_NODEJS_VERSION }} | ||
cache: "npm" | ||
|
||
- run: npm ci | ||
- run: npm run transpile | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '20.x' | ||
- name: Cypress run | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
start: npm run cypress:server | ||
wait-on: 'http://localhost:8124' | ||
record: true | ||
env: | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- run: npm ci | ||
- run: npm run transpile | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup node ${{ env.PRIMARY_NODEJS_VERSION }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.PRIMARY_NODEJS_VERSION }} | ||
cache: "npm" | ||
- run: npm ci | ||
- run: npm run lint | ||
|
||
- name: Cypress run | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
start: npm run cypress:server | ||
wait-on: 'http://localhost:8124' | ||
record: true | ||
env: | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
typecheck: | ||
name: TypeScript typings | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup node ${{ env.PRIMARY_NODEJS_VERSION }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.PRIMARY_NODEJS_VERSION }} | ||
cache: "npm" | ||
- run: npm ci | ||
- run: npm run typecheck | ||
|
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