Basic integration tests #221
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 | |
env: | |
NODE_VERSION: 18.x | |
on: | |
push: | |
# Prevent duplicate runs of this workflow on our own internal PRs. | |
branches: | |
- main | |
- next/* | |
pull_request: | |
types: [opened, synchronize, reopened, labeled] | |
branches: | |
- main | |
- next/* | |
jobs: | |
bundles: | |
name: Check Bundles | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Check Bundles | |
shell: bash | |
run: ./test/lint/check-bundles.sh | |
integration: | |
name: Integration Tests | |
needs: [bundles] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install Dependencies | |
shell: bash | |
run: npm ci --verbose | |
- name: Build | |
uses: neon-actions/[email protected] | |
with: | |
working-directory: ./pkgs/cargo-messages | |
target: linux-x64-gnu | |
node-version: ${{ env.NODE_VERSION }} | |
use-cross: false | |
npm-publish: false | |
github-release: false | |
- name: Start npm Proxy | |
shell: bash | |
working-directory: ./test/integration/proxy | |
timeout-minutes: 3 | |
run: ./ci-proxy.sh | |
- name: Publish to npm Proxy | |
shell: bash | |
working-directory: ./test/integration/proxy | |
timeout-minutes: 3 | |
run: ./publish.sh | |
# Since package integrity checksums may vary depending on what versions | |
# are available in the proxy registry, we don't put the lockfile for this | |
# test in source control. This means we have to use `npm i`, not `npm ci`. | |
- name: Setup test-sniff-bytes Integration Test | |
shell: bash | |
working-directory: test/integration/test-sniff-bytes | |
run: npm i || (cat ../proxy/proxy.log && exit 1) | |
- name: Run test-sniff-bytes Integration Test | |
shell: bash | |
working-directory: test/integration/test-sniff-bytes | |
run: npm test |