name: explorer-build # Only explorer, shared/ui and root npm changes, or changes to this workflow, # run it. Rust-only changes don't affect the web app: its tests run against a # pinned, pre-built radicle-httpd. on: push: paths: - "explorer/**" - "shared/**" - "package.json" - "package-lock.json" - ".npmrc" - ".nvmrc" - "!explorer/crates/**" - "!explorer/Cargo.toml" - "!explorer/Cargo.lock" - "!explorer/rust-toolchain" - "!explorer/.cargo/**" - ".github/workflows/explorer-build.yml" workflow_dispatch: env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true defaults: run: working-directory: explorer jobs: build: timeout-minutes: 30 runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 with: node-version-file: ".nvmrc" - name: Install dependencies run: npm ci - name: Install Playwright Browsers run: npx playwright install chromium - name: Build app run: npm run build - name: Run Playwright build smoke test run: npm run test:e2e -- --project chromium --config playwright.buildSmoke.config.ts # The worker resolves compat.ts imports, such as zod, from explorer's # node_modules, so it needs both installs. - name: Install Open Graph worker dependencies run: npm ci --prefix workers/open-graph - name: Bundle Open Graph worker run: npm run check:open-graph - name: Upload artifacts uses: actions/upload-artifact@v7 if: always() with: name: test-artifacts-${{ runner.os }} retention-days: 30 if-no-files-found: "ignore" path: | explorer/tests/artifacts/**/*