AppSignals Functionality - add AlwaysRecordSampler and Utility files, add pr-build workflow #1
Workflow file for this run
This file contains hidden or 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"] | |
env: | |
NPM_CONFIG_UNSAFE_PERM: true | |
steps: | |
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }} | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- 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: Install | |
run: npm ci | |
- name: Build | |
run: npm run compile | |
- name: Unit tests (Full) | |
if: matrix.code-coverage | |
run: npm run test | |
- name: Report Coverage | |
if: ${{ matrix.code-coverage && !cancelled()}} | |
uses: codecov/codecov-action@v4 | |
with: | |
verbose: true | |
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 |