-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.44 KB
/
python.yaml
File metadata and controls
53 lines (50 loc) · 1.44 KB
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
# This workflow will run the tests on the python version of tictactoe
name: Python
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./tictactoe_python
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Checkout repo
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Installation
run: |
uv sync --group dev
- name: Lint with ruff
uses: astral-sh/ruff-action@v3
- name: Check formatting with ruff
uses: astral-sh/ruff-action@v3
with:
args: "format --check"
- name: Typecheck with pyright
run: uv run pyright
- name: Thorough check with pylint
run: uv run pylint tictactoe/
- name: Test with pytest
run: |
uv run coverage run -m pytest --durations=10
uv run coverage report -m
uv run coverage json
uv run coverage html
- name: Archive code coverage results
uses: actions/upload-artifact@v6
with:
name: code-coverage-report-${{ matrix.python-version }}
path: ./tictactoe_python/htmlcov/