Skip to content

Implement GitHub actions #1

Implement GitHub actions

Implement GitHub actions #1

Workflow file for this run

name: PR Pipeline
on: [pull_request]
jobs:
build:
name: Build
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Restore cached .venv
uses: actions/cache/restore@v4
with:
key: venv-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
path: .venv
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config --list
make install
- name: Cache .venv
uses: actions/cache/save@v4
with:
key: venv-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
path: .venv
test:
name: Test
needs: [build]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Restore cached .venv
uses: actions/cache/restore@v4
with:
key: venv-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
path: .venv
- name: Run tests
run: make test
lint:
name: Lint
needs: [build]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Restore cached .venv
uses: actions/cache/restore@v4
with:
key: venv-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
path: .venv
- name: Run linter
run: make lint