-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (54 loc) · 1.45 KB
/
py.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
61
name: Python CI
on:
push:
branches: [ main ]
paths: [ py/**, .github/workflows/py.yml ]
pull_request:
branches: [ main ]
paths: [ py/**, .github/workflows/py.yml ]
workflow_dispatch:
jobs:
get-inputs:
uses: ephemient/aoc2024/.github/workflows/get-inputs.yml@main
secrets:
SESSION: ${{ secrets.SESSION }}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: snok/install-poetry@v1
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: poetry
- run: poetry install --no-interaction
working-directory: py
- run: poetry run ruff check
working-directory: py
- run: poetry run ruff format --check
working-directory: py
- run: poetry run pytest --benchmark-skip
working-directory: py
- run: poetry build
working-directory: py
- uses: actions/upload-artifact@v4
with:
name: aoc2024-py
path: py/dist/*.whl
run:
needs: [ get-inputs, build ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- uses: actions/setup-python@v5
with:
python-version: 3.13
- run: |
python -m venv .
. bin/activate
pip install *.whl
working-directory: aoc2024-py
- run: aoc2024-py/bin/aoc2024
env:
AOC2024_DATADIR: inputs
PYTHON_HOME: aoc2024-py