Skip to content

Commit

Permalink
improve ci
Browse files Browse the repository at this point in the history
  • Loading branch information
timzaak committed Jul 1, 2024
1 parent c45d60b commit 64ee4fd
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion .github/workflows/spa-server-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,29 @@ on:
workflow_dispatch:

jobs:
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
check_server: ${{ steps.filter.outputs.check_server }}
check_js_client: ${{ steps.filter.outputs.check_js_client }}
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
check_server:
- 'client/**'
- 'server/**'
check_js_sdk:
- 'jsclient/**'
check_server:
needs: changes
if: ${{ needs.changes.outputs.check_server == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -26,4 +48,17 @@ jobs:
- name: run spa-client test
run: cargo test -p spa-client -j 1 -- --test-threads 1
- name: run spa-server test
run: cargo test -p spa-server
run: cargo test -p spa-server
check_js_client:
needs: changes
if: ${{ needs.changes.outputs.check_js_client == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
cache-dependency-path: './jsclient/package-lock.json'
- run: npm ci && npm run build

0 comments on commit 64ee4fd

Please sign in to comment.