Skip to content

Commit

Permalink
Add lint & typecheck to github action change check
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Dec 19, 2024
1 parent 48f7ec1 commit d885d0b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 24 deletions.
77 changes: 54 additions & 23 deletions .github/workflows/main.yml
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

1 change: 0 additions & 1 deletion models/load-benchmark/ui.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { loadDataFromUrl } from '../../src/core/utils/load-data.ts';
import { utils } from '../../src/lib.ts';

function prettySize(size, signed, pad) {
Expand Down

0 comments on commit d885d0b

Please sign in to comment.