forked from spacetelescope/stcal
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (73 loc) · 2 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
84
85
86
name: CI
on:
push:
branches:
- main
- '*.x'
tags:
- '*'
pull_request:
schedule:
# Weekly Monday 9AM build
# * is a special character in YAML so you have to quote this string
- cron: '0 9 * * 1'
env:
CRDS_SERVER_URL: https://jwst-crds.stsci.edu
CRDS_PATH: ~/crds_cache
CRDS_CLIENT_RETRY_COUNT: 3
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20
jobs:
tox:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- name: Python 3.10
runs-on: ubuntu-latest
python-version: '3.10'
toxenv: py310
- name: Python 3.9 with coverage
runs-on: ubuntu-latest
python-version: 3.9
toxenv: py39-cov
- name: macOS
runs-on: macos-latest
python-version: 3.9
toxenv: py39
- name: Code style checks
runs-on: ubuntu-latest
python-version: 3.9
toxenv: style
- name: Security audit
runs-on: ubuntu-latest
python-version: 3.9
toxenv: bandit
- name: jwst tests with coverage
runs-on: ubuntu-latest
python-version: 3.9
toxenv: jwst-cov
- name: romancal tests with coverage
runs-on: ubuntu-latest
python-version: 3.9
toxenv: romancal-cov
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
pip install tox
- name: Run tox
run: tox -e ${{ matrix.toxenv }}
- name: Upload coverage to codecov
if: ${{ contains(matrix.toxenv,'-cov') }}
uses: codecov/codecov-action@v2
with:
file: ./coverage.xml
fail_ci_if_error: true