-
Notifications
You must be signed in to change notification settings - Fork 32
83 lines (73 loc) · 2.35 KB
/
ci.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
name: CI
on:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Daily “At 00:00”
jobs:
test:
# if: |
# github.repository == 'UXARRAY/uxarray'
name: Python (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "macos-latest", "macos-14", "windows-latest"]
python-version: [ "3.9", "3.10", "3.11"]
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- name: checkout
uses: actions/checkout@v4
with:
token: ${{ github.token }}
- name: conda_setup (x64)
uses: conda-incubator/setup-miniconda@v3
if: matrix.os != 'macos-14'
with:
activate-environment: uxarray_build
channel-priority: strict
python-version: ${{ matrix.python-version }}
channels: conda-forge
environment-file: ci/environment.yml
miniforge-variant: Mambaforge
miniforge-version: latest
- name: conda_setup (ARM64)
uses: conda-incubator/setup-miniconda@v3
if: matrix.os == 'macos-14'
with:
activate-environment: uxarray_build
channel-priority: strict
python-version: ${{ matrix.python-version }}
channels: conda-forge
environment-file: ci/environment.yml
installer-url: https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Mambaforge-23.11.0-0-MacOSX-arm64.sh
- name: Install uxarray
run: |
python -m pip install . --no-deps
- name: conda list
run: |
conda list
- name: Run Namespace Tests
run: |
python -m pytest test
- name: Run Coverage Tests
run: |
python -m pytest test -v --cov=./uxarray --cov-report=xml
- name: Upload code coverage to Codecov
if: github.repository == 'UXARRAY/uxarray'
uses: codecov/codecov-action@v4.5.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false