feat(ui): use dynamic group routes #129
Workflow file for this run
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
name: main | |
on: | |
# push trigger required to get coveralls monitoring of default branch | |
# pull_request required to get PR coveralls comments | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
# no need to bother caching bun deps | |
# https://github.com/oven-sh/setup-bun/issues/14#issuecomment-1714116221 | |
jobs: | |
changed-files: | |
runs-on: ubuntu-latest | |
outputs: | |
any_jts_changed: ${{ steps.changed-files.outputs.jts_any_changed }} | |
any_sol_changed: ${{ steps.changed-files.outputs.sol_any_changed }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: tj-actions/changed-files@v44 | |
id: changed-files | |
with: | |
files_yaml: | | |
jts: | |
- tsconfig.json | |
- apps/{client,server}/**/*.ts | |
- apps/{client,server}/package.json | |
- apps/{client,server}/tsconfig.json | |
sol: | |
- 'contracts/**/*.sol' | |
_test-jts: | |
needs: changed-files | |
if: needs.changed-files.outputs.any_jts_changed == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v2 | |
- run: bun install | |
- run: bun test --coverage --coverage-reporter lcov --coverage-dir . | |
# - name: Coveralls | |
# uses: coverallsapp/github-action@v2.3.0 | |
# with: | |
# # TODO: remove when some tests are defined | |
# allow-empty: true | |
# format: lcov | |
# file: lcov.info | |
_test-sol: | |
needs: changed-files | |
if: needs.changed-files.outputs.any_sol_changed == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: foundry-rs/foundry-toolchain@v1.2.0 | |
- uses: oven-sh/setup-bun@v2 | |
- run: bun install # need semaphore contracts as node module | |
- run: forge coverage --root contracts --report lcov --report-file lcov-sol.info | |
# - name: Upload sol test coverage report | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: lcov-sol.info | |
# path: lcov-sol.info | |
test: | |
needs: [_test-jts, _test-sol] | |
if: ${{ !(failure() || cancelled()) }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Tests OK (passed or skipped) | |
run: true | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v2 | |
- uses: foundry-rs/foundry-toolchain@v1.2.0 | |
- run: bun install | |
- name: Validate | |
run: | | |
bun concurrently \ | |
-c auto \ | |
-n format,lint-jtsx,lint-sol,typecheck-server,typecheck-ui \ | |
'bun dprint check' \ | |
'bun biome check --config-path=.biome.jsonc .' \ | |
'bun solhint --config contracts/.solhint.json contracts/{src,test}/**/*.sol' \ | |
'bun tsc -p apps/server/tsconfig.build.json' \ | |
'bun tsc -p apps/client/tsconfig.json' |