-
Notifications
You must be signed in to change notification settings - Fork 19
60 lines (52 loc) · 1.39 KB
/
pytest_on_pr.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
name: Run PyTest on PR to Main Branch
on:
pull_request:
branches:
- main
paths:
- 'messages/**'
- 'tools/**'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.12.0, 3.11.0]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies (messages)
run: |
cd messages
python -m venv venv
source venv/bin/activate
pip install -e .
pip install pytest coverage
- name: Install dependencies (tools)
run: |
cd tools
python -m venv venv
source venv/bin/activate
pip install -e .
pip install pytest coverage playwright
playwright install
- name: Run tests and coverage (messages)
run: |
cd messages
source venv/bin/activate
pytest
coverage run --omit="tests/*" -m pytest
coverage report
- name: Run tests and coverage (tools)
env:
SIRJI_PROJECT: '.'
SIRJI_RUN_PATH: './abcd1234'
run: |
cd tools
source venv/bin/activate
pytest
coverage run --omit="tests/*" -m pytest
coverage report