-
Notifications
You must be signed in to change notification settings - Fork 5
60 lines (50 loc) · 1.42 KB
/
python.yml
File metadata and controls
60 lines (50 loc) · 1.42 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
54
55
56
57
58
59
60
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Python
on:
push:
branches: [ "main" ]
paths:
- "src/**"
- "tests/**"
- ".github/**"
- "g4/**"
- "pyproject.toml"
pull_request:
branches: [ "main" ]
paths:
- "src/**"
- "tests/**"
- ".github/**"
- "g4/**"
- "pyproject.toml"
jobs:
python:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ['3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Python 3
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7
with:
enable-cache: true
- name: Set up Python 3
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ matrix.python-version }}
- name: "Generate parser files"
run: |
./generate.sh
- name: Install dependencies
run: |
uv sync --all-extras --dev
- name: "Run unit tests"
run: |
uv run pytest -vs