-
Notifications
You must be signed in to change notification settings - Fork 8
43 lines (38 loc) · 1.19 KB
/
unit-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Unit Tests and Coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
unit-tests:
runs-on: ubuntu-latest
# If we are going to use a prebuilt image like this we need a webwork repository on docker hub
container: drgrice1/webwork3
steps:
- uses: actions/checkout@v2
- name: Run perl unit tests
env:
HARNESS_PERL_SWITCHES: -MDevel::Cover
run: |
perl t/db/build_db.pl
prove -r t
# we probably don'te need to upload the codecov data
# - uses: actions/upload-artifact@v2
# with:
# name: coverage-report
# path: cover_db/
- name: Push coverage analysis
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: cover -report codecov
# Install node (for npm) and use it to install eslint and stylelint dependencies.
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install Dependencies
run: npm ci
- name: Run typescript (client-side) tests
run: npm run test