-
Notifications
You must be signed in to change notification settings - Fork 21
107 lines (90 loc) · 3.08 KB
/
main.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
docker-pinned-req:
name: Docker image, requirements.txt
runs-on: ubuntu-latest
container:
image: quay.io/solararbiter/solarforecastarbiter-core:latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-test.txt
tlmgr --usermode install $(cat packages.tex) --repository=http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2020/tlnet-final
- name: Install solarforecastarbiter with extras
run: pip install '.[all]'
- name: Pytest
run: pytest solarforecastarbiter --cov --cov-report=xml
- name: flake8
run: flake8 solarforecastarbiter
if: ${{ always() }}
- name: coverage
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: adder,subtractor,pypi
fail_ci_if_error: true
if: ${{ always() }}
- name: make docs
run: |
pip install -r docs/requirements.txt
make -C docs html
if: ${{ always() }}
#
# Run all tests on Linux using standard PyPI packages, including min and pre-releases
# inspired by MetPy and XArray
# https://github.com/Unidata/MetPy/blob/master/.github/workflows/tests-pypi.yml
# https://github.com/pydata/xarray/blob/master/.github/workflows/ci.yaml
#
PyPITests:
name: ${{ matrix.python-version }} ${{ matrix.dep-versions }} ${{ matrix.extras }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8]
dep-versions: [Minimum, Unconstrained]
extras: [all]
include:
# the minimum versions are not currently compatible with python 3.9
- python-version: 3.9
dep-versions: Unconstrained
extras: all
- python-version: 3.7
dep-versions: Minimum
extras: test
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# if needed, add sudo apt-get install to first line of run
- name: Install base dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Install solarforecastarbiter with extras
run: |
python -m pip install '.[${{ matrix.extras }}]' -c .github/${{ matrix.dep-versions }}
- name: List installed packages
run: python -m pip list
- name: Pytest
run: |
python -m pytest solarforecastarbiter --cov --cov-report=xml
- name: coverage
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: adder,subtractor,pypi
fail_ci_if_error: true
name: pypi-${{ matrix.python-version }}-${{ matrix.dep-versions }}
if: ${{ always() }}