update test node versions

deepsource-autofix-76c6eb20
Dan Gowans 2023-11-29 13:14:03 -05:00
parent 18a5eb729a
commit 95bbfeba48
1 changed files with 15 additions and 14 deletions

View File

@ -10,12 +10,12 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [ 14, 16, 18 ]
node: [ 18, 20, 21 ]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v3
@ -24,10 +24,6 @@ jobs:
with:
node-version: ${{ matrix.node }}
- name: Update npm (Node 14 only)
run: npm install -g npm@7
if: ${{ matrix.node == 14 }}
- name: Install Application
run: |
npm ci
@ -40,7 +36,7 @@ jobs:
run: npm run test:startup
- name: Code Climate (Before)
if: ${{ github.event_name != 'pull_request' && env.CC_TEST_REPORTER_ID != '' && matrix.node == 16 }}
if: ${{ github.event_name != 'pull_request' && env.CC_TEST_REPORTER_ID != '' && matrix.node == 20 }}
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./codeclimate-test-reporter
chmod +x codeclimate-test-reporter
@ -55,17 +51,22 @@ jobs:
run: c8 --reporter=lcov --reporter=text --reporter=text-summary mocha --timeout 10000 --exit
- name: Code Climate (After)
if: ${{ github.event_name != 'pull_request' && env.CC_TEST_REPORTER_ID != '' && matrix.node == 16 }}
if: ${{ github.event_name != 'pull_request' && env.CC_TEST_REPORTER_ID != '' && matrix.node == 20 }}
run: |
./codeclimate-test-reporter after-build -t lcov --exit-code $?
- name: Codacy
if: ${{ github.event_name != 'pull_request' && env.CODACY_PROJECT_TOKEN != '' && matrix.node == 16 }}
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r ./coverage/lcov.info
- name: Codecov
if: ${{ github.event_name != 'pull_request' && env.CODECOV_TOKEN != '' && matrix.node == 16 }}
if: ${{ github.event_name != 'pull_request' && env.CODECOV_TOKEN != '' && matrix.node == 20 }}
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}
./codecov -t ${CODECOV_TOKEN}
- name: DeepSource
if: ${{ github.event_name != 'pull_request' && env.DEEPSOURCE_DSN != '' && matrix.node == 20 }}
run: |
# Install deepsource CLI
curl https://deepsource.io/cli | sh
# From the root directory, run the report coverage command
./bin/deepsource report --analyzer test-coverage --key javascript --value-file ./coverage/lcov.info