-
-
Notifications
You must be signed in to change notification settings - Fork 25
68 lines (55 loc) · 2.1 KB
/
test.yaml
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
name: Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
# Required shell entrypoint to have properly activated conda environments
defaults:
run:
shell: bash -l {0}
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
environment-file: [ci/environment.yml]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed by codecov.io
- name: Get current date
id: date
run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
- name: Install Environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{ matrix.environment-file }}
create-args: python=${{ matrix.python-version }}
# Wipe cache every 24 hours or whenever environment.yml changes. This means it
# may take up to a day before changes to unpinned packages are picked up.
# To force a cache refresh, change the hardcoded numerical suffix below.
cache-environment-key: environment-${{ steps.date.outputs.date }}-1
- name: Install current main versions of dask
run: python -m pip install git+https://github.com/dask/dask
if: ${{ matrix.environment-file == 'ci/environment.yml' }}
- name: Install current main versions of distributed
run: python -m pip install git+https://github.com/dask/distributed
if: ${{ matrix.environment-file == 'ci/environment.yml' }}
- name: Install dask-expr
run: python -m pip install -e . --no-deps
- name: Print dask versions
# Output of `micromamba list` is buggy for pip-installed packages
run: pip list | grep -E 'dask|distributed'
- name: Run tests
run: py.test -n auto --verbose --cov=dask_expr --cov-report=xml
- name: Coverage
uses: codecov/codecov-action@v3