-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (68 loc) · 2.33 KB
/
ci.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
69
70
71
72
73
74
75
# This workflow will install Python dependencies, run tests across multiple
# Python versions, and lints things 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: CI
on: # yamllint disable-line rule:truthy
push:
branches:
- "master"
pull_request:
branches:
- "*"
jobs:
tests:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
allowed-to-fail: [false]
include:
# 3.11 fails because of coverage. Need to update to >= 6.3, but then
# doing so would drop support for Python 3.6. See
# https://coverage.readthedocs.io/en/7.6.1/changes.html#version-6-3-2022-01-25
- python-version: "3.11"
allowed-to-fail: true
- python-version: "3.12"
allowed-to-fail: true
- python-version: "3.13"
allowed-to-fail: true
name: "Build and Test: Python ${{ matrix.python-version }}"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v4
continue-on-error: ${{ matrix.allowed-to-fail }}
with:
python-version: "${{ matrix.python-version }}"
- name: Install dependencies
continue-on-error: ${{ matrix.allowed-to-fail }}
run: |
pip install -r requirements-dev.txt
pip install -e .
- name: Run tests
continue-on-error: ${{ matrix.allowed-to-fail }}
run: |
pytest -ra pyerf --cov=pyerf --cov-report term-missing --cov-config .coveragerc
- name: Run doctest
continue-on-error: ${{ matrix.allowed-to-fail }}
run: |
python -m doctest pyerf/pyerf.py
# A summary of all jobs and their result.
# This is the only job that's required to pass (as set by branch protection
# rules in repo settings) so that we don't have to update those rules when
# a new job is added.
check-all-jobs:
if: always()
needs:
- tests
# - lint
runs-on: ubuntu-latest
steps:
- name: Check status of all jobs.
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}