Post release 0.4.0: Update version to 0.4.0-dev0 #317
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: JavaScript Instrumentation PR Build | |
on: | |
pull_request: | |
branches: | |
- main | |
- "release/v*" | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails | |
matrix: | |
node: ["14", "16", "18", "20", "22"] | |
include: | |
- node: 18 | |
code-coverage: true | |
env: | |
NPM_CONFIG_UNSAFE_PERM: true | |
steps: | |
- name: Checkout Repo @ SHA - ${{ github.sha }} | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Update npm to a version that supports workspaces (v7 or later) | |
if: ${{ matrix.node < 16 }} | |
run: npm install -g npm@9 # npm@9 supports node >=14.17.0 | |
- name: NPM Clean Install | |
# https://docs.npmjs.com/cli/v10/commands/npm-ci | |
run: npm ci | |
- name: Compile all NPM projects | |
run: npm run compile | |
- name: Build Lambda Layer | |
run: npm run build-lambda | |
- name: Unit tests (Full) | |
run: npm run test:coverage | |
- name: Report Coverage | |
if: ${{ matrix.code-coverage && !cancelled()}} | |
uses: codecov/codecov-action@v4 | |
with: | |
verbose: true | |
contract-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: run contract tests | |
run: | | |
bash ./scripts/build_and_install_distro.sh | |
bash scripts/set-up-contract-tests.sh | |
pip install pytest | |
pytest contract-tests/tests | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- run: npm ci | |
- name: Lint | |
run: | | |
npm run lint | |
npm run lint:markdown | |
npm run lint:readme |