first release #81
Workflow file for this run
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: Run Tests | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - 'releases/**' | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: 'true' | |
| jobs: | |
| ci: | |
| name: CI - Node.js ${{ matrix.node-version }} & Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: | |
| # Node.js 18 only doesn't work because undici fails on 18 with: | |
| # | |
| # /home/runner/work/python/python/node_modules/.pnpm/[email protected]/node_modules/undici/lib/web/webidl/index.js:531 | |
| # webidl.is.File = webidl.util.MakeTypeAssertion(File) | |
| # ^ | |
| # ReferenceError: File is not defined | |
| # | |
| # - '18' | |
| - '20' | |
| - '22' | |
| - '24' | |
| python-version: | |
| - '3.8' | |
| - '3.9' | |
| - '3.10' | |
| - '3.11' | |
| - '3.12' | |
| - '3.13' | |
| # - '3.14-rc' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup SSH Agent | |
| uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: | | |
| ${{ secrets.SSH_PRIVATE_KEY }} | |
| ${{ secrets.HTTP_HANDLER_ACCESS_TOKEN }} | |
| ${{ secrets.HTTP_REWRITER_ACCESS_TOKEN }} | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.pnpm-store | |
| key: node-modules-${{ hashFiles('package.json') }} | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| # Remove when using published dependency | |
| - name: Set private package config | |
| run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}" | |
| env: | |
| NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
| - name: Install dependencies | |
| run: pnpm install | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| # TODO: replace with plain `pnpm install` when using published dependency | |
| - name: Build python-node manually | |
| run: | | |
| # Configure git to use SSH host aliases for private repos (needed by cargo) | |
| git config --global url."ssh://[email protected]/platformatic/http-handler".insteadOf "ssh://[email protected]/platformatic/http-handler" | |
| git config --global url."ssh://[email protected]/platformatic/http-handler.git".insteadOf "ssh://[email protected]/platformatic/http-handler.git" | |
| git config --global url."ssh://[email protected]/platformatic/http-rewriter".insteadOf "ssh://[email protected]/platformatic/http-rewriter" | |
| git config --global url."ssh://[email protected]/platformatic/http-rewriter.git".insteadOf "ssh://[email protected]/platformatic/http-rewriter.git" | |
| cd node_modules/@platformatic/python-node | |
| pnpm install --ignore-scripts | |
| pnpm run build | |
| pnpm run build:wasm | |
| pnpm run build:fix | |
| - name: Run Full Test Suite | |
| shell: bash | |
| run: pnpm test |