Fix dependencies version syntax #231
Workflow file for this run
This file contains 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: | |
- master | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
branches: | |
- master | |
jobs: | |
unit-test-rust: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install rustup | |
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
- uses: Swatinem/rust-cache@v2 | |
- name: install additional targets | |
run: rustup target add wasm32-wasi | |
- name: test | |
run: cargo test | |
- name: lint | |
run: cargo clippy | |
# currently `cargo wasi test` doesn't run, so ensure at least that it builds | |
- name: build (wasi) | |
run: cargo build --target wasm32-wasi | |
unit-test-js: | |
runs-on: ubuntu-latest | |
name: unit-test-js (Node ${{ matrix.node-version }}) | |
strategy: | |
matrix: | |
node-version: [18.18, 18, 20.5, 20] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
- run: npm run check --workspaces --if-present | |
- run: npm test --workspaces --if-present | |
e2e-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# 20.5 is added because @nitrogql/esbuild-register behaves differently | |
# before and after 20.6 | |
# 18.18 is added for the same reason | |
node-version: [18.18, 18, 20.5, 20] | |
name: e2e-test (Node ${{ matrix.node-version }}) | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install rustup | |
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
- uses: Swatinem/rust-cache@v2 | |
- name: install additional targets | |
run: rustup target add wasm32-wasi wasm32-unknown-unknown | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install | |
- name: build rust | |
run: ./build/build-rust.sh | |
- name: build node | |
run: ./build/build-node.sh | |
- name: run e2e tests | |
run: npm run e2e-test --workspace ./e2e-tests | |
- name: run nitrogql in nextjs example | |
run: | | |
npm run generate | |
npm run build | |
working-directory: examples/nextjs | |
- name: run nitrogql in vite example | |
run: | | |
npm run generate | |
npm run build | |
working-directory: examples/vite |