-
Notifications
You must be signed in to change notification settings - Fork 34
82 lines (73 loc) · 2.17 KB
/
ci_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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# GitHub Actions workflow for testing and continuous integration.
#
# This file performs testing using tox and tox.ini to define and configure the test environments.
# Remove -numpy126 when we support testing with numpy 2.0
name: CI Tests
on:
push:
branches:
- main
tags:
- "*"
pull_request:
# branches: # only build on PRs against 'main' if you need to further limit when CI is run.
# - main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
ARCH_ON_CI: "normal"
IS_CRON: "false"
jobs:
oorb-data:
uses: ./.github/workflows/oorb_data.yml
tests:
needs: [oorb-data]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
setenv: |
ARCH_ON_CI: "normal"
IS_CRON: "false"
OORB_DATA: "$GITHUB_WORKSPACE/oorb-data/"
cache-path: oorb-data/
cache-key: oorb-data
submodules: false
coverage: ""
envs: |
- name: Code style checks
linux: codestyle
- name: Python 3.11 with minimal dependencies, measuring coverage
linux: py311-test-numpy126-cov
coverage: codecov
- name: Python 3.10 with all optional dependencies, measuring coverage
linux: py310-test-numpy126-alldeps-cov
coverage: codecov
- name: Python 3.9 with oldest supported versions
linux: py39-test-oldestdeps
macos-test:
name: Python 3.11 with all optional dependencies (MacOS)
needs: [oorb-data]
runs-on: macos-13
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Restore cached files
uses: actions/cache/restore@v4
with:
path: oorb-data/
key: oorb-data
- name: Set environment
run: |
echo "OORB_DATA=$GITHUB_WORKSPACE/oorb-data" >> "$GITHUB_ENV"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install tox
run: |
pip install tox
- name: Run tests
run: |
tox -e py311-test-numpy126-alldeps