Added tests. #2
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: Ruff Linter | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: read | |
| actions: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| token: ${{ secrets.ORG_PAT }} # Use the PAT for submodule authentication | |
| fetch-depth: 0 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.10" | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "${HOME}/.cargo/bin" >> $GITHUB_PATH | |
| - name: Create virtual environment and install dependencies | |
| run: | | |
| uv venv | |
| if [ -f requirements-optional.txt ]; then uv pip install -r requirements-optional.txt; fi | |
| uv pip install ruff | |
| - name: Run Ruff | |
| run: | | |
| source .venv/bin/activate | |
| uv run ruff check . |