-
Notifications
You must be signed in to change notification settings - Fork 97
77 lines (71 loc) · 2.36 KB
/
testing.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
name: 'test'
on:
push:
branches:
- "main"
pull_request:
branches:
- '*'
schedule:
- cron: "30 2 * * *"
jobs:
test:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
environment: [
ci-py309-min-deps,
ci-py309-min-optional-deps,
ci-py312-latest-deps,
ci-py312-latest-optional-deps
]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.24.0
environments: ${{ matrix.environment }}
# we can freeze the environment and manually bump the dependencies to the
# latest version time to time.
frozen: true
- name: Run tests
run: pixi run -e ${{ matrix.environment }} test -n 3
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: skrub-data/skrub
check_run_nightly:
runs-on: ubuntu-latest
outputs:
run: ${{ github.event_name == 'schedule' || contains(steps.get_head_commit_message.outputs.COMMIT_MSG, '[deps nightly]') }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- id: get_head_commit_message
name: get head commit message
run: echo "COMMIT_MSG=$(git show -s --format=%s)" >> "$GITHUB_OUTPUT"
test_against_nightly:
needs: check_run_nightly
if: ${{ needs.check_run_nightly.outputs.run == 'true' }}
runs-on: ubuntu-latest
name: test against nighlty dependencies
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
name: 'Setup python'
- shell: bash {0}
run: |
dev_anaconda_url=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
pip install --pre --upgrade --timeout=60 --extra-index $dev_anaconda_url .
dev_arrow=https://pypi.fury.io/arrow-nightlies/
pip install --extra-index-url $dev_arrow --prefer-binary --pre .[optional]
pip install .[test]
name: 'Install skrub and nightly dependencies'
- shell: bash {0}
run: pytest -vsl --cov=skrub --cov-report=xml skrub -n 3
name: 'Run tests'