diff --git a/.circleci/config.yml b/.circleci/config.yml index 9642d92..6007888 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,11 +21,6 @@ jobs: - node-modules-v1-{{ checksum "package-lock.json" }}-{{ .Branch }} - node-modules-v1-{{ checksum "package-lock.json" }}- - node-modules-v1- - - run: - name: Download cc-test-reporter - command: | - curl -L -o ./cc-test-reporter https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 - chmod +x ./cc-test-reporter - run: name: Install JS Dependencies command: npm install @@ -35,11 +30,4 @@ jobs: - ~/serverless-iiif/node_modules - run: name: JS Tests - command: | - ./cc-test-reporter before-build - npm run-script test-coverage - mv coverage/clover.xml ./clover.xml - ./cc-test-reporter after-build --coverage-input-type clover --exit-code $? - - run: - name: Send coverage to Coveralls - command: yarn run coveralls < coverage/lcov.info + command: npm run-script test-coverage diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..31db2c8 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +--- +name: Deploy docs to GitHub Pages +on: + - push +concurrency: + group: "tests" + cancel-in-progress: false +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [16, 18, 20] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Restore cache + uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-nodejs-${{ matrix.node-version}}-${{ github.ref }}-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.os }}-nodejs-${{ matrix.node-version}}-${{ github.ref }}-${{ hashFiles('package-lock.json') }} + ${{ runner.os }}-nodejs-${{ matrix.node-version}}-${{ github.ref }}- + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: npm + - name: Run Tests + uses: paambaati/codeclimate-action@v2.2.4 + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + with: + coverageCommand: npm run test-coverage + - name: Run Tests + run: npm test-coverage + - name: Send coverage to Coveralls + uses: coverallsapp/github-action@v2 diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 0b1477a..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "editor.codeActionsOnSave": { - "source.fixAll.sortJSON": false - } -}