Skip to content

Commit

Permalink
Test under both Node.js 18 and 20 with pinned CI actions
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Hinek <[email protected]>
  • Loading branch information
frankhinek committed Nov 21, 2023
1 parent f22fc6e commit de12c6f
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,50 @@ jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node: [18, 20]

steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: 18
node-version: ${{ matrix.node }}

- name: Install dependencies
run: npm install
run: npm ci

- name: Run tests
run: npm run test

- name: Upload test coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

container-build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: docker build .

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: DavidAnson/markdownlint-cli2-action@v13
- uses: DavidAnson/markdownlint-cli2-action@ed4dec634fd2ef689c7061d5647371d8248064f1 #v13.0.0
with:
globs: '**/*.md'

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: 18
node-version: 20

- name: Install dependencies
run: npm ci
Expand Down

0 comments on commit de12c6f

Please sign in to comment.