[pre-commit.ci] pre-commit autoupdate #484
This file contains 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: Continuous Integration - Quality & Unit Tests | |
on: [push, pull_request] | |
jobs: | |
continuous-integration-quality-unit-tests: | |
name: ${{ matrix.os }} - Python ${{ matrix.python-version }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.13] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Environment Variables | |
run: | | |
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV | |
echo "CI_PACKAGE=colour_datasets" >> $GITHUB_ENV | |
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV | |
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV | |
shell: bash | |
- name: Set up Python 3.10 for Pre-Commit | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install uv | |
run: | | |
pip install uv | |
shell: bash | |
- name: Install Package Dependencies | |
run: | | |
uv sync --all-extras --no-dev | |
uv run python -c "import imageio;imageio.plugins.freeimage.download()" | |
shell: bash | |
- name: Pre-Commit (All Files) | |
run: | | |
uv run pre-commit run --all-files | |
shell: bash | |
- name: Test Optimised Python Execution | |
run: | | |
uv run python -OO -c "import $CI_PACKAGE" | |
shell: bash | |
- name: Test with Pytest | |
run: | | |
uv run python -W ignore -m pytest --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE | |
shell: bash | |
- name: Upload Coverage to coveralls.io | |
run: | | |
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else uv run coveralls; fi | |
shell: bash |