-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (38 loc) · 997 Bytes
/
test.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
name: Testing
on:
pull_request:
branches: [ "main" ]
workflow_call:
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
steps:
# - name: Install Act dependencies
# if: ${{ env.ACT }}
# run: |
# apt update -qq > /dev/null
# apt install apt-utils -y -qq > /dev/null
# apt remove python3
# apt install python3.11 python3-venv pipx -y
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'poetry'
- name: Install dependencies
run: poetry install --with dev
- name: Test with pytest
run: |
poetry run coverage run -m pytest
poetry run coverage report -m
poetry run coverage html
- name: Share coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov/