Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Github Actions test workflow #147

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
51 changes: 51 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Run Tests
on:
- push
concurrency:
group: "tests"
cancel-in-progress: false
jobs:
lts-runtime:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['lts/-2', 'lts/-1']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: package-lock.json
- name: Install Dependencies
run: npm ci
- name: Run Tests
run: npm run test
current-runtime:
runs-on: ubuntu-latest
needs: lts-runtime
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: npm
cache-dependency-path: package-lock.json
- name: Install Dependencies
run: npm ci
- name: Setup Code Climate
uses: remarkablemark/setup-codeclimate@v2
- name: Run Tests
run: |
cc-test-reporter before-build
npm run test-coverage
cc-test-reporter after-build --exit-code $?
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
- name: Send coverage to Coveralls
uses: coverallsapp/github-action@v2
5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

Loading