Merge pull request #245 from flyingrobots/fix/python-imports #684
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: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| WESLEY_CLI_VERSION: "0.1.0" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20, 22] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v6.0.9 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 | |
| if: matrix.node-version == 22 | |
| id: cache-wesley | |
| with: | |
| path: ~/.local/bin/wesley-${{ env.WESLEY_CLI_VERSION }} | |
| key: ${{ runner.os }}-wesley-cli-crates-io-${{ env.WESLEY_CLI_VERSION }} | |
| - name: Install Wesley CLI | |
| if: matrix.node-version == 22 && steps.cache-wesley.outputs.cache-hit != 'true' | |
| run: | | |
| cargo install \ | |
| wesley-cli \ | |
| --version "$WESLEY_CLI_VERSION" \ | |
| --locked \ | |
| --root "$RUNNER_TEMP/wesley" | |
| mkdir -p "$HOME/.local/bin" | |
| cp "$RUNNER_TEMP/wesley/bin/wesley" "$HOME/.local/bin/wesley-$WESLEY_CLI_VERSION" | |
| - name: Configure Wesley CLI | |
| if: matrix.node-version == 22 | |
| run: | | |
| chmod +x "$HOME/.local/bin/wesley-$WESLEY_CLI_VERSION" | |
| echo "WESLEY_BIN=$HOME/.local/bin/wesley-$WESLEY_CLI_VERSION" >> "$GITHUB_ENV" | |
| - name: Structural history schema check | |
| if: matrix.node-version == 22 | |
| run: pnpm schema:structural-history:check | |
| - name: Lint | |
| if: matrix.node-version == 22 | |
| run: pnpm lint | |
| - run: pnpm typecheck | |
| - name: Build Node 20 package artifacts | |
| if: matrix.node-version == 20 | |
| run: pnpm build | |
| - name: Smoke Node 20 package runtime | |
| if: matrix.node-version == 20 | |
| run: node bin/graft.js --version | |
| - name: Tests | |
| if: matrix.node-version == 22 | |
| run: pnpm test |