MAINT: refactor homology installation #341
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: CI | |
on: | |
push: | |
branches-ignore: | |
- master | |
pull_request: | |
branches-ignore: | |
- master | |
jobs: | |
ci-not-internet: | |
name: "Python ${{ matrix.python-version }} (${{ matrix.os }})" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: "actions/checkout@v4" | |
with: | |
fetch-depth: 0 | |
- name: Set up cache | |
id: cache-data | |
uses: actions/cache@v3 | |
with: | |
path: tests/data | |
key: ${{ runner.os }}-data-v1-${{ hashFiles('tests/data/small-113.zip') }} | |
restore-keys: | | |
${{ runner.os }}-data-v1- | |
- name: Check cache status | |
run: | | |
echo "Cache hit: ${{ steps.cache-data.outputs.cache-hit }} ***" | |
- name: Download data file | |
if: steps.cache-data.outputs.cache-hit != 'true' | |
run: | | |
curl -o tests/data/small-113.zip https://zenodo.org/records/14625203/files/small-113.zip | |
- name: Unzip data file | |
run: | | |
cd tests/data | |
unzip -o -q small-113.zip | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "pyproject.toml" | |
- name: "Installs for ${{ matrix.python-version }}" | |
run: | | |
uv venv venv -p python${{ matrix.python-version }} | |
uv tool install -p venv nox | |
- name: "Run nox for ${{ matrix.python-version }}" | |
run: | | |
nox -db uv -s test-${{ matrix.python-version }} -- -m 'not internet' --cov-report lcov:lcov-${{matrix.os}}-${{matrix.python-version}}.lcov --cov-report term --cov-append --cov ensembl_tui | |
- name: Coveralls Parallel | |
uses: coverallsapp/github-action@v2 | |
with: | |
parallel: true | |
github-token: ${{ secrets.github_token }} | |
flag-name: run-${{matrix.python-version}}-${{matrix.os}} | |
file: "tests/lcov-${{matrix.os}}-${{matrix.python-version}}.lcov" | |
ci-internet: | |
name: "Python ${{ matrix.python-version }} (${{ matrix.os }})" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.12"] | |
steps: | |
- uses: "actions/checkout@v4" | |
with: | |
fetch-depth: 0 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "pyproject.toml" | |
- name: "Installs for ${{ matrix.python-version }}" | |
run: | | |
uv venv venv -p python${{ matrix.python-version }} | |
uv tool install -p venv nox | |
- name: "Run nox for ${{ matrix.python-version }}" | |
run: | | |
nox -db uv -s test-${{ matrix.python-version }} -- -m 'internet' --cov-report lcov:lcov-${{matrix.os}}-${{matrix.python-version}}-internet.lcov --cov-report term --cov-append --cov ensembl_tui | |
- name: Coveralls Parallel | |
uses: coverallsapp/github-action@v2 | |
with: | |
parallel: true | |
github-token: ${{ secrets.github_token }} | |
flag-name: run-${{matrix.python-version}}-${{matrix.os}} | |
file: "tests/lcov-${{matrix.os}}-${{matrix.python-version}}-internet.lcov" | |
finish: | |
name: "Finish Coveralls" | |
needs: [ci-not-internet, ci-internet] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.github_token }} | |
parallel-finished: true |