Repository navigation
work with most recent plum-dispatch (#13) #43
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: Python Lint | |
| on: | |
| pull_request: | |
| branches: [master] | |
| push: | |
| branches: [master] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Create virtual environment | |
| run: | | |
| python -m venv venv | |
| source venv/bin/activate | |
| echo "VIRTUAL_ENV=$(pwd)/venv" >> $GITHUB_ENV | |
| echo "$(pwd)/venv/bin" >> $GITHUB_PATH | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pre-commit | |
| # Install project dependencies if they exist | |
| if [ -f "requirements.txt" ]; then pip install -r requirements.txt; fi | |
| if [ -f "pyproject.toml" ]; then pip install -e .; fi | |
| - name: Run pre-commit | |
| run: |- | |
| pre-commit run --all-files |