Repository navigation
chore(deps): bump js-yaml from 4.2.0 to 4.3.0 in /playground (#303) #1311
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, release/v0.3.2] | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| rust: | |
| name: Rust workspace | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTFLAGS: "-D warnings" | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@5b842231ba77f5c045dba54ac5560fed2db780e2 # nightly | |
| with: | |
| toolchain: nightly | |
| components: rustfmt, clippy | |
| - uses: dtolnay/rust-toolchain@5b842231ba77f5c045dba54ac5560fed2db780e2 # stable | |
| with: | |
| toolchain: stable | |
| targets: wasm32-unknown-unknown | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 | |
| - name: cargo build | |
| run: cargo build --workspace --all-targets --all-features | |
| - name: cargo check wasm32 | |
| run: cargo check --target wasm32-unknown-unknown -p truapi-server | |
| - name: cargo +nightly fmt --check | |
| run: cargo +nightly fmt --check | |
| - name: cargo +nightly clippy | |
| run: cargo +nightly clippy --workspace --all-targets --all-features -- -D warnings | |
| - name: cargo test | |
| run: cargo test --workspace --all-features | |
| licenses: | |
| name: Dependency licenses | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: cargo deny check licenses | |
| uses: EmbarkStudios/cargo-deny-action@bb137d7af7e4fb67e5f82a49c4fce4fad40782fe # v2.0.20 | |
| with: | |
| command: check licenses | |
| codegen: | |
| name: Codegen | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@5b842231ba77f5c045dba54ac5560fed2db780e2 # stable | |
| with: | |
| toolchain: stable | |
| - uses: dtolnay/rust-toolchain@5b842231ba77f5c045dba54ac5560fed2db780e2 # nightly | |
| with: | |
| toolchain: nightly | |
| components: rustfmt | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 22 | |
| - name: Install workspace deps | |
| run: npm ci --ignore-scripts | |
| - name: Run codegen | |
| run: ./scripts/codegen.sh | |
| - name: Check generated Rust output is committed | |
| run: | | |
| git diff --exit-code -- \ | |
| rust/crates/truapi-server/src/generated \ | |
| rust/crates/truapi-server/src/wasm/generated_bridge.rs | |
| - name: Check Rust/TS wire table parity | |
| run: TRUAPI_REQUIRE_GENERATED_TS=1 cargo test -p truapi-server --test wire_table_ts_parity | |
| - name: Upload codegen output | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: codegen-output | |
| if-no-files-found: error | |
| retention-days: 1 | |
| path: | | |
| js/packages/truapi/src/generated | |
| js/packages/truapi/src/playground/codegen | |
| js/packages/truapi/src/explorer/codegen | |
| js/packages/truapi/src/explorer/versions.ts | |
| js/packages/truapi-host/src/generated | |
| playground/test/generated | |
| ts-client: | |
| name: "@parity/truapi" | |
| runs-on: ubuntu-latest | |
| needs: codegen | |
| env: | |
| TRUAPI_REQUIRE_GENERATED: 1 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 22 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| with: | |
| bun-version: latest | |
| - name: Download codegen output | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: codegen-output | |
| - name: Install | |
| run: npm ci --ignore-scripts | |
| - name: Build | |
| run: npm run build --prefix js/packages/truapi | |
| - name: Test | |
| run: npm test --prefix js/packages/truapi | |
| ts-host: | |
| name: "@parity/truapi-host" | |
| runs-on: ubuntu-latest | |
| needs: codegen | |
| env: | |
| TRUAPI_REQUIRE_GENERATED: 1 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 22 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| with: | |
| bun-version: latest | |
| - name: Download codegen output | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: codegen-output | |
| - name: Install | |
| run: npm ci --ignore-scripts | |
| - name: Build | |
| run: npm run build --prefix js/packages/truapi-host | |
| - name: Test | |
| run: npm test --prefix js/packages/truapi-host | |
| playground: | |
| name: Playground (build + lint) | |
| runs-on: ubuntu-latest | |
| needs: ts-client | |
| env: | |
| TRUAPI_REQUIRE_GENERATED: 1 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 22 | |
| - name: Download codegen output | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: codegen-output | |
| - name: Install workspace deps + build @parity/truapi | |
| run: | | |
| npm ci --ignore-scripts | |
| npm run build --prefix js/packages/truapi | |
| - name: Install playground deps | |
| working-directory: playground | |
| run: yarn install --frozen-lockfile | |
| - name: Cache Next.js build | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: playground/.next/cache | |
| key: ${{ runner.os }}-nextjs-${{ hashFiles('playground/yarn.lock') }}-${{ hashFiles('playground/src/**', 'playground/scripts/**', 'playground/public/**', 'playground/next.config.js', 'playground/tsconfig.json', 'playground/package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nextjs-${{ hashFiles('playground/yarn.lock') }}- | |
| - name: Build | |
| working-directory: playground | |
| run: yarn build | |
| - name: Lint | |
| working-directory: playground | |
| run: yarn lint | |
| explorer: | |
| name: Explorer (build + lint) | |
| runs-on: ubuntu-latest | |
| needs: ts-client | |
| env: | |
| TRUAPI_REQUIRE_GENERATED: 1 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 22 | |
| - name: Download codegen output | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: codegen-output | |
| - name: Install workspace deps + build @parity/truapi | |
| run: | | |
| npm ci --ignore-scripts | |
| npm run build --prefix js/packages/truapi | |
| - name: Install explorer deps | |
| working-directory: explorer | |
| run: npm ci | |
| - name: Lint | |
| working-directory: explorer | |
| run: npm run lint | |
| - name: Build | |
| working-directory: explorer | |
| run: npm run build | |
| e2e: | |
| name: E2E (playground inside dotli) | |
| # Temporarily disabled while the dotli playground smoke test is stabilized. | |
| if: false | |
| runs-on: ubuntu-latest | |
| needs: playground | |
| timeout-minutes: 30 | |
| env: | |
| TRUAPI_REQUIRE_GENERATED: 1 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| submodules: recursive | |
| persist-credentials: false | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 22 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| with: | |
| bun-version: latest | |
| - name: Download codegen output | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: codegen-output | |
| - name: Build @parity/truapi | |
| run: | | |
| npm ci --ignore-scripts | |
| npm run build --prefix js/packages/truapi | |
| - name: Install dotli deps | |
| working-directory: hosts/dotli | |
| run: bun install --frozen-lockfile | |
| - name: Install playground deps | |
| working-directory: playground | |
| run: yarn install --frozen-lockfile | |
| - name: Install Playwright browsers | |
| working-directory: playground | |
| run: npx playwright install --with-deps chromium | |
| - name: Run Playwright e2e | |
| working-directory: playground | |
| run: yarn e2e | |
| - name: Upload Playwright report | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: playwright-report | |
| path: playground/playwright-report | |
| retention-days: 14 | |
| ci-status: | |
| name: CI Status | |
| if: always() | |
| runs-on: ubuntu-latest | |
| needs: | |
| [rust, licenses, codegen, ts-client, ts-host, playground, explorer, e2e] | |
| steps: | |
| - name: Check all jobs | |
| run: | | |
| results=( | |
| "${{ needs.rust.result }}" | |
| "${{ needs.licenses.result }}" | |
| "${{ needs.codegen.result }}" | |
| "${{ needs.ts-client.result }}" | |
| "${{ needs.ts-host.result }}" | |
| "${{ needs.playground.result }}" | |
| "${{ needs.explorer.result }}" | |
| "${{ needs.e2e.result }}" | |
| ) | |
| for r in "${results[@]}"; do | |
| if [[ "$r" != "success" && "$r" != "skipped" ]]; then | |
| echo "::error::One or more CI jobs failed or were cancelled." | |
| exit 1 | |
| fi | |
| done | |
| echo "All CI jobs passed." |