-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 890 Bytes
/
python.yaml
File metadata and controls
37 lines (30 loc) · 890 Bytes
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
name: Pre-commit and test Python and Docker files
on:
push:
branches:
- main
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 # TODO: only checkout once
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.1
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Read Python version from .version file
id: python_version
run: echo "PYTHON_VERSION=$(cat .version)" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
pip install uv
uv sync
- name: Test with pytest
run: |
uv run pytest tests/ --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html