Skip to content

Commit

Permalink
chore: Clean up unit test GitHub action (#88)
Browse files Browse the repository at this point in the history
* Clean up unused test config

* Stop testing on Node.js v16

* Test license checker on Node.js v18 and v20

* Upgrade action versions to latest
  • Loading branch information
JoshMock authored Mar 28, 2024
1 parent 4ebb9d9 commit f7c8092
Showing 1 changed file with 6 additions and 49 deletions.
55 changes: 6 additions & 49 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,17 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [16.x, 18.x, 19.x, 20.x]
node-version: [18.x, 19.x, 20.x]
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

# workaround for failing tests on Node.js 14.x
# see https://github.com/actions/setup-node/issues/411
- name: Force install specific npm version
run: |
npm install --global [email protected]
npm install --global [email protected]
- name: Install
run: |
npm install
Expand All @@ -49,55 +42,19 @@ jobs:
run: |
npm run test:acceptance
# TODO: migrate to Buildkite, Codecov is no longer used at Elastic
# code-coverage:
# name: Code coverage
# runs-on: ubuntu-latest

# strategy:
# matrix:
# node-version: [18.x]

# steps:
# - uses: actions/checkout@v3

# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v2
# with:
# node-version: ${{ matrix.node-version }}

# - name: Install
# run: |
# npm install

# - name: Code coverage report
# run: |
# npm run test:coverage-report

# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# file: ./coverage.lcov
# fail_ci_if_error: true

# TODO: renabled this as soon as the project is back at 100%
# - name: Code coverage 100%
# run: |
# npm run test:coverage-100

license:
name: License check
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand Down

0 comments on commit f7c8092

Please sign in to comment.