Fix workflow command quoting #3
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
| # Verify shared-cache behavior across supported Node.js releases and operating systems. | |
| name: Cross-platform tests | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| workflow_dispatch: | |
| # Tests need repository and public workspace-data access but no write permissions. | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: ${{ matrix.os }} / Node.js ${{ matrix.node }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| node: [20, 22, 24] | |
| steps: | |
| # Check out the exact revision selected by the workflow event. | |
| - name: Check out repository | |
| uses: actions/checkout@v7 | |
| # Install each supported Node.js runtime independently on every operating system. | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| # Install runtime dependencies without requiring a generated package lock. | |
| - name: Install dependencies | |
| run: npm install --no-audit --no-fund | |
| # Check out only this project's test concern from the public workspace-data source. | |
| - name: Check out public tests | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: SorinGFS/public-data | |
| ref: master | |
| path: workspace-data | |
| sparse-checkout: tests/github.com/SorinGFS/shared-http-cache | |
| # Reproduce the ordinary workspace layout consumed by the package test script. | |
| - name: Materialize public tests | |
| run: >- | |
| node -e "const fs = require('node:fs'); fs.mkdirSync('#/public/tests', { recursive: true }); fs.cpSync('workspace-data/tests/github.com/SorinGFS/shared-http-cache', '#/public/tests', { recursive: true })" | |
| # Execute the materialized behavioral suite. | |
| - name: Run tests | |
| run: npm test | |
| # Reject syntax errors in the package entry point. | |
| - name: Check syntax | |
| run: npm run check |