forked from cogent3/ensembldb3
-
Notifications
You must be signed in to change notification settings - Fork 15
118 lines (98 loc) · 3.49 KB
/
testing_develop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
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