-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (48 loc) · 1.3 KB
/
example-bank-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
44
45
46
47
48
49
50
51
name: Test and coverage
on:
pull_request:
push:
workflow_dispatch:
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: test with ${{ matrix.py }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
py:
- "3.10"
os:
- ubuntu-latest
services:
postgres:
image: postgres:9.6
env:
POSTGRES_USER: openg2p
POSTGRES_PASSWORD: openg2p
POSTGRES_DB: openg2p
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
- name: Install test requirements
run: |
python -m pip install -r test-requirements.txt
python -m pip install -e openg2p-g2p-bridge-example-bank-api
# TODO: add other packages here
- name: Run test suite
run: |
pytest --cov-branch --cov-report=term-missing --cov=openg2p-g2p-bridge-example-bank-api --cov=tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}