UniProt Parser Refactor – Improved Modularity, Identifier Extraction, and Test Coverage #297
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: Run tests | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - ready_for_review | |
| jobs: | |
| code_format: | |
| name: Check code formatting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7.1.2 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run code formatting checks | |
| shell: bash | |
| continue-on-error: false | |
| run: uv run ruff format --check | |
| code_linting: | |
| name: Run code lint checks | |
| runs-on: ubuntu-latest | |
| needs: code_format | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7.1.2 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run code linting checks | |
| run: uv run ruff check --output-format=github . | |
| spark_tests: | |
| name: Run container tests | |
| needs: code_format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Run spark tests | |
| shell: bash | |
| continue-on-error: false | |
| run: | | |
| docker pull ghcr.io/berdatalakehouse/spark_notebook:main | |
| echo "Running tests inside container..." | |
| # slightly nasty hack | |
| chmod 777 . | |
| docker run --rm -e NB_USER=runner -v .:/tmp/cdm ghcr.io/berdatalakehouse/spark_notebook:main /bin/bash /tmp/cdm/scripts/run_tests.sh | |
| - name: Send to Codecov | |
| id: send_to_codecov | |
| uses: codecov/codecov-action@v5.5.1 | |
| with: | |
| files: coverage.xml | |
| # fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| tests: | |
| name: Run local tests (${{ matrix.python-version }}, ${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| needs: code_format | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.13"] | |
| os: ["ubuntu-24.04"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7.1.2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Run local tests | |
| shell: bash | |
| continue-on-error: false | |
| run: uv run pytest -m "not requires_spark" |