Fix missing headers for fetch #575
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: Node.js SDK Continuous Build | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
name: Build Node ${{ matrix.node-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
node-version: | |
- 14.x | |
- 16.x | |
- 18.x | |
- 20.x | |
include: | |
- os: ubuntu-latest | |
node-version: 16.x | |
coverage: true | |
- os: macos-13 | |
node-version: 14.x | |
exclude: | |
# Issue with npm6 on windows resulting in failing workflows: | |
# https://github.com/npm/cli/issues/4341#issuecomment-1040608101 | |
# Since node14 is EOL, we can drop this set from our tests. | |
# We still test node14 on other platforms. | |
- os: windows-latest | |
node-version: 14.x | |
# https://github.com/actions/runner-images/issues/9741 | |
# macos-latest provides only ARM hosts | |
# https://github.com/nodejs/node/issues/36161 | |
# https://github.com/nodejs/node/issues/40126 | |
# Without workarounds, Node.js 14 isn't supported on ARM macos | |
# As workaround, test on macos-13 version instead | |
- os: macos-latest | |
node-version: 14.x | |
steps: | |
- name: Checkout AWS XRay SDK Node Repository @ default branch latest | |
uses: actions/checkout@v3 | |
- name: Setup Node ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
check-latest: true | |
- run: npm install -g [email protected] | |
- name: Cache NPM modules | |
uses: actions/cache@v3 | |
with: | |
path: | | |
node_modules | |
package-lock.json | |
packages/*/node_modules | |
packages/*/package-lock.json | |
key: ${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('package.json', 'packages/*/package.json') }}-06142023 | |
- name: Bootstrap | |
run: | | |
npm ci | |
npx lerna bootstrap --no-ci --hoist | |
- name: Build | |
run: | | |
npx lerna run compile | |
shell: bash | |
- name: Execute tests with Lerna | |
if: '!matrix.coverage' | |
run: | | |
npx lerna run test | |
shell: bash | |
# Only need to report coverage once, so only run instrumented tests on one Node version/OS | |
# Use lerna to get reports from all packages | |
- name: Report coverage | |
if: matrix.coverage | |
run: | | |
npx lerna run testcov | |
npx lerna run reportcov | |
env: | |
CI: true | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
if: matrix.coverage | |
with: | |
directory: ./packages/core/ | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.lcov | |
verbose: true |