From 95bbfeba48f988b652a2f55fe0f153bde77f98e8 Mon Sep 17 00:00:00 2001 From: Dan Gowans Date: Wed, 29 Nov 2023 13:14:03 -0500 Subject: [PATCH] update test node versions --- .github/workflows/coverage.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ce763c83..1fb80a57 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -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} \ No newline at end of file + ./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 \ No newline at end of file