fix concurrency issue and invalid snapshots #41
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
on: | |
push: | |
branches: ['ijjk/update-ci-workflow'] | |
name: Build, test, and deploy | |
env: | |
NAPI_CLI_VERSION: 2.14.7 | |
TURBO_VERSION: 1.6.3 | |
RUST_TOOLCHAIN: nightly-2023-03-09 | |
PNPM_VERSION: 7.24.3 | |
NODE_MAINTENANCE_VERSION: 16 | |
NODE_LTS_VERSION: 18 | |
TEST_CONCURRENCY: 6 | |
# TODO: remove after testing | |
NEXT_TEST_CONTINUE_ON_ERROR: 'true' | |
jobs: | |
build: | |
runs-on: self-linux-x64-16gb | |
env: | |
TURBO_TEAM: 'vercel' | |
TURBO_REMOTE_ONLY: 'true' | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
NEXT_TELEMETRY_DISABLED: 1 | |
# we build a dev binary for use in CI so skip downloading | |
# canary next-swc binaries in the monorepo | |
NEXT_SKIP_NATIVE_POSTINSTALL: 1 | |
steps: | |
- run: node -v | |
- run: rustc --version | |
- run: pwd | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 25 | |
- run: fnm use 18 | |
- run: rustup toolchain install "${RUST_TOOLCHAIN}" | |
- run: rustup default "${RUST_TOOLCHAIN}" | |
- run: npm i -g "pnpm@${PNPM_VERSION}" "turbo@${TURBO_VERSION}" "@napi-rs/cli@${NAPI_CLI_VERSION}" | |
- run: pnpm store path | |
- run: pnpm install | |
- run: pnpm build | |
- run: turbo run build-native -- --release --target x86_64-unknown-linux-gnu | |
- run: pnpm playwright install-deps | |
- run: pnpm playwright install chromium | |
- run: git clean -xdf test; git checkout test; | |
- run: rm -rf /tmp/next-repo-*; rm -rf /tmp/next-install-* | |
- run: node run-tests.js --type unit -c ${TEST_CONCURRENCY} | |
name: Run development/ tests | |
- run: node run-tests.js --type development -c ${TEST_CONCURRENCY} | |
name: Run development/ tests | |
- run: node run-tests.js --type production -c ${TEST_CONCURRENCY} | |
name: Run production/ tests | |
- run: node run-tests.js --type e2e -c ${TEST_CONCURRENCY} | |
name: Run e2e dev tests | |
env: | |
NEXT_TEST_MODE: 'dev' | |
- run: node run-tests.js --type e2e -c ${TEST_CONCURRENCY} | |
name: Run e2e start tests | |
env: | |
NEXT_TEST_MODE: 'start' |