-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (59 loc) · 1.88 KB
/
all-test-and-coverage.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: All Tests and Coverage
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 60
env:
# use localhost for the host here because we are running the job on the VM.
# If we were running the job on in a container this would be postgres
LOGLEVEL: INFO
DB_SSL: false
DB_DOMAIN: localhost
DB_PORT: 5984
DB_NAME: test
DB_PASS: admin
DB_USER: admin
services:
couchdb:
image: couchdb:3.2
env:
COUCHDB_USER: admin
COUCHDB_PASSWORD: admin
COUCHDB_SECRET: superSensitiveSecret
NODENAME: node
ERL_FLAGS: -setcookie "brumbrum"
ports:
# will assign a random free host port
- 5984:5984
# needed because the postgres container does not provide a healthcheck
options: --health-cmd "curl http://localhost:5984" --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "18.x"
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Seed Database
run: ./.devcontainer/seed_db.sh
- name: Run All Tests and Coverage
run: npm run test:coverage
- name: Download CodeCov Uploader
run: curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov
- name: Generate The Report
run: npx nyc report --reporter=lcov -e .js -e .ts -e .jsx -e .tsx -e .svelte
- name: Upload Coverage to CodeCov
run: ./codecov
# - uses: actions/upload-artifact@v2
# if: always()
# with:
# name: playwright-report
# path: playwright-report/
# retention-days: 30