Skip to content

Commit

Permalink
Add Github Actions test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mbklein committed May 24, 2024
1 parent db99bd6 commit e284ef1
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 18 deletions.
14 changes: 1 addition & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

0 comments on commit e284ef1

Please sign in to comment.