Skip to content

Test (PR #48): test pr #308

Test (PR #48): test pr

Test (PR #48): test pr #308

Workflow file for this run

name: Test
run-name: |
${{ (github.event_name == 'pull_request' && format('Test (PR #{0}): {1}', github.event.number, github.event.pull_request.title))
|| format('Test: {0}', github.event.head_commit.message) }}
on:
# Event: A maintainer has pushed commits or merged a PR to main.
push:
# Limiting push events to 'main' prevents duplicate runs of this workflow
# when maintainers push to internal PRs.
branches:
- main
# Event: A contributor has created or updated a PR.
pull_request:
types: [opened, synchronize, reopened, labeled]
branches:
- main
jobs:
bundles:
name: Check Bundles
runs-on: ubuntu-latest
steps:
- name: Diagnostics
shell: bash
run: |
cat <<GITHUB_EVENT_JSON
${{toJSON(github.event)}}
GITHUB_EVENT_JSON
- 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: Setup Neon Environment
id: neon
uses: ./.github/actions/setup-neon
with:
platform: linux-x64-gnu
workspace: ./pkgs/cargo-messages
- name: Install Dependencies
shell: bash
run: npm ci --verbose
- name: Build
shell: bash
env:
CARGO_BUILD_TARGET: ${{ steps.neon.outputs.target }}
NEON_BUILD_PLATFORM: linux-x64-gnu
run: npm run build
working-directory: ./pkgs/cargo-messages
- name: Pack
shell: bash
run: npm pack ./platforms/linux-x64-gnu --pack-destination=${{ runner.temp }}
working-directory: ./pkgs/cargo-messages
- 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 linux-x64-gnu
# 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