Skip to content

Commit

Permalink
chore: adjust x86 target to use VM not docker and run integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dav1do committed Nov 15, 2024
1 parent 3c22bbb commit 780e241
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ jobs:
build: pnpm build:wasm --target x86_64-apple-darwin && pnpm build:js
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
# using vm instead of docker, but leaving in case we need this for other targets
# docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: pnpm build:wasm --target x86_64-unknown-linux-gnu && pnpm build:js
test: cd tests/c1-integration && pnpm run test
- host: macos-latest
target: aarch64-apple-darwin
build: pnpm build:wasm --target aarch64-apple-darwin && pnpm build:js
Expand Down Expand Up @@ -90,17 +92,10 @@ jobs:
run: ${{ matrix.settings.build }}
if: ${{ !matrix.settings.docker }}
shell: bash
- name: Test in docker
uses: addnab/docker-run-action@v3
if: ${{ matrix.settings.docker }}
with:
image: ${{ matrix.settings.docker }}
options: '--user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build'
# skip integration tests because container inside container is a problem
run: pnpm run test:ci
- name: Test
run: pnpm run test:ci && cd tests/c1-integration && pnpm run test
if: ${{ !matrix.settings.docker }}
# we only run integration tests on linux vm where we have access to docker we can talk to
- name: Integration tests
run: ${{ matrix.settings.test }}
if: ${{ !matrix.settings.test }}
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -213,4 +208,4 @@ jobs:
shell: bash
- name: Test bindings
working-directory: ${{ env.FLIGHT_SQL_PATH }}
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim yarn test
run: pnpm test

0 comments on commit 780e241

Please sign in to comment.