Merge pull request #25 from freelawproject/gha_prevent_duplicate_runs #102
This file contains hidden or 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: Lint | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- uses: pre-commit/[email protected] | |
- name: Install UV | |
uses: astral-sh/setup-uv@v4 | |
- name: Define a cache dependency glob | |
uses: astral-sh/setup-uv@v4 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
- name: Initialize the virtual environment | |
run: uv venv | |
- name: Add virtual environment to PATH | |
run: echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH | |
- name: Install the project | |
run: uv sync --extra cpu --frozen; | |
- name: Debug paths | |
run: | | |
pwd | |
ls -al | |
- name: mypy Static Type Checker | |
run: mypy inception |