Repository navigation
Ignore Notebook while pytesting #14
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 application | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4.2.2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| uv sync --all-extras --dev | |
| - name: Lint with ruff | |
| run: | | |
| uv run ruff check . | |
| - name: Format check with black | |
| run: | | |
| uv run black --check . | |
| - name: Install package | |
| run: | | |
| uv pip install -e . | |
| - name: Test with pytest | |
| run: | | |
| uv run pytest --ignore=tests/notebooks_test.py --cov-config=pyproject.toml --cov=pystrata --cov=tests --cov-report xml | |
| - name: Run codacy-coverage-reporter | |
| uses: codacy/codacy-coverage-reporter-action@v1.3.0 | |
| with: | |
| project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
| coverage-reports: coverage.xml |