-
Notifications
You must be signed in to change notification settings - Fork 5
67 lines (59 loc) · 1.87 KB
/
tests.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Tests
on:
push:
branches: [ main, v0.** ]
pull_request:
branches: [ main, v0.** ]
schedule:
- cron: "0 0 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Test:
name: ${{ matrix.env }}, python ${{ matrix.python }}, ${{ matrix.os }}
timeout-minutes: 30
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
dev: [false]
python: ["3.9", "3.10", "3.11", "3.12"]
env: ["latest"]
# Use openblas instead of mkl saves 600 MB. Linux OK, 50% slower on Windows and OSX!
extra: ["nomkl"]
include:
- env: minimal
os: ubuntu-latest
dev: false
python: "3.9"
- env: latest
os: macos-latest
dev: false
python: "3.11"
- env: latest
os: windows-latest
dev: false
python: "3.11"
steps:
- uses: actions/checkout@v4
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: '1.5.1-0'
environment-file: ci/envs/${{ matrix.env }}.yml
create-args: >-
python=${{ matrix.python }}
${{ matrix.extra }}
- name: Test
run: |
pytest --color=yes --cov=cropclassification --cov-append --cov-report term-missing --cov-report xml tests/
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }} # required