CI #126
This file contains hidden or 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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "17 20 * * *" | |
| permissions: | |
| contents: read | |
| jobs: | |
| node: | |
| name: Node unit and package | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ci-node-${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| - run: npm ci | |
| - run: npm audit --audit-level=moderate | |
| - run: npm run format:check | |
| - run: npm run lint | |
| - run: npm run typecheck | |
| - run: npm test | |
| - run: npm pack --dry-run | |
| ci-hygiene: | |
| name: CI hygiene | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ci-hygiene-${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: raven-actions/actionlint@205b530c5d9fa8f44ae9ed59f341a0db994aa6f8 # v2 | |
| hosted-live-integration: | |
| name: Hosted live integration | |
| runs-on: ubuntu-latest | |
| needs: node | |
| if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' | |
| concurrency: | |
| group: hosted-live-integration | |
| cancel-in-progress: false | |
| steps: | |
| - name: Require hosted live integration token | |
| env: | |
| WDL_LIVE_ISSUER_TOKEN: ${{ secrets.WDL_LIVE_ISSUER_TOKEN }} | |
| run: | | |
| if [ -z "$WDL_LIVE_ISSUER_TOKEN" ]; then | |
| echo "WDL_LIVE_ISSUER_TOKEN secret is required for hosted live integration." >&2 | |
| exit 1 | |
| fi | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| - run: npm ci | |
| - run: npm run test:integration:live | |
| env: | |
| WDL_LIVE_CONTROL_URL: ${{ vars.WDL_LIVE_CONTROL_URL || 'api.wdl.dev' }} | |
| WDL_LIVE_PLATFORM_DOMAIN: ${{ vars.WDL_LIVE_PLATFORM_DOMAIN || 'wdl.sh' }} | |
| WDL_LIVE_TEMPLATE: ${{ vars.WDL_LIVE_TEMPLATE || 'wdl-cli-integration' }} | |
| WDL_LIVE_ISSUER_TOKEN: ${{ secrets.WDL_LIVE_ISSUER_TOKEN }} |