Skip to content

Merge pull request #304 from GavinHuttley/develop #568

Merge pull request #304 from GavinHuttley/develop

Merge pull request #304 from GavinHuttley/develop #568

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.11", "3.13"]
steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
- name: Set up small cache
id: cache-small-data
uses: actions/cache@v3
with:
path: tests/data
key: ${{ runner.os }}-small-v3-${{ hashFiles('tests/data/small-115.zip') }}
restore-keys: |
${{ runner.os }}-small-v3-
- name: Check cache status
run: |
echo "Cache hit: ${{ steps.cache-small-data.outputs.cache-hit }} ***"
- name: Download small data file
if: steps.cache-small-data.outputs.cache-hit != 'true'
run: |
curl -L -o tests/data/small-115.zip "https://www.dropbox.com/scl/fi/cknsuhd6k8t6fjn1odzog/small-115.zip?rlkey=zkacmbhx4ssf4v80d78dd9uql&dl=1"
- name: Set up apes installed cache
id: cache-apes-data
uses: actions/cache@v3
with:
path: tests/data
key: ${{ runner.os }}-apes-v3-${{ hashFiles('tests/data/apes-115.zip') }}
restore-keys: |
${{ runner.os }}-apes-v3-
- name: Check apes data cache status
run: |
echo "Cache hit: ${{ steps.cache-apes-data.outputs.cache-hit }} ***"
- name: Download apes installation data file
if: steps.cache-apes-data.outputs.cache-hit != 'true'
run: |
curl -L -o tests/data/apes-115.zip "https://www.dropbox.com/scl/fi/h6kd0rlntvyzcb6d485fa/apes-115.zip?rlkey=4hza000j7btue6qwnxvnid5gb&dl=1"
- name: Set up apes maf cache
id: cache-apes-data-maf
uses: actions/cache@v3
with:
path: tests/data
key: ${{ runner.os }}-apes-maf-v3-${{ hashFiles('tests/data/apes-115-maf.zip') }}
restore-keys: |
${{ runner.os }}-apes-maf-v3-
- name: Check apes maf cache status
run: |
echo "Cache hit: ${{ steps.cache-apes-data-maf.outputs.cache-hit }} ***"
- name: Download apes maf data file
if: steps.cache-apes-data-maf.outputs.cache-hit != 'true'
run: |
curl -L -o tests/data/apes-115-maf.zip "https://www.dropbox.com/scl/fi/2wmle5kzjdqralppvddsr/apes-115-maf.zip?rlkey=u1hbfo0jqwhfkfukntgx5tbfn&dl=1"
- name: Unzip data files
run: |
cd tests/data
unzip -o -q small-115.zip
unzip -o -q apes-115.zip
unzip -o -q apes-115-maf.zip
- uses: "actions/setup-python@v5"
with:
python-version: "${{ matrix.python-version }}"
- name: Install uv
uses: astral-sh/setup-uv@v6
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 --force-python python -s test -- -m 'not internet' --durations=10 --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.13"]
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' --durations=10 --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