Day 7: Bridge Repair #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python CI | |
on: | |
push: | |
branches: [ main ] | |
paths: [ py/** ] | |
pull_request: | |
branches: [ main ] | |
paths: [ py/** ] | |
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 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 |