diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml new file mode 100644 index 0000000..64c1687 --- /dev/null +++ b/.github/workflows/quality.yml @@ -0,0 +1,51 @@ +name: Code quality + +on: + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + lint: + name: Ruff + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.14" + cache: pip + cache-dependency-path: requirements-dev.txt + + - name: Install development dependencies + run: python -m pip install -r requirements-dev.txt + + - name: Run Ruff + run: ruff check . + + tests: + name: Pytest + needs: lint + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.14" + cache: pip + cache-dependency-path: requirements-dev.txt + + - name: Install development dependencies + run: python -m pip install -r requirements-dev.txt + + - name: Run pytest + run: python -m pytest \ No newline at end of file