Skip to content

Commit

Permalink
create static check github action for src, parser and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
robertKozik committed Jan 18, 2024
1 parent ee72c87 commit dc03b9b
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/static-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: TypeScript & EsLint & Tests - subdirectories
on:
pull_request:
merge_group:
branches:
- main
push:
# commented out for test purposes
# branches:
# - main
jobs:
static-analysis:
runs-on: ubuntu-latest
strategy:
matrix: {dir: ['parser', 'example', 'WebExample', 'src']}
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install root node dependencies
run: yarn
- name: Install ${{ matrix.dir }} app node dependencies
if: ${{ matrix.dir != 'example' || matrix.dir != 'src' }}
working-directory: ${{ matrix.dir }}
run: npm ci
- name: Check types
working-directory: ${{ matrix.dir }}
run: npx tsc -p ./tsconfig.json --noEmit
- name: Lint
run: yarn lint:${{ matrix.dir }}
- name: run tests
# no tests inside example and WebExample
if: ${{ matrix.dir != 'example' || matrix.dir != 'WebExample' }}
working-directory: ${{ matrix.dir }}
run: npm run tests

0 comments on commit dc03b9b

Please sign in to comment.