forked from scikit-hep/coffea
-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (110 loc) · 3.84 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: CI/CD
on:
push:
branches:
- master
pull_request:
branches:
- master
# Run daily at 0:01 UTC
schedule:
- cron: '1 0 * * *'
jobs:
linter:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.7]
name: linter - flake8 - python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Lint with flake8
run: |
python -m pip install -q flake8
flake8 coffea
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest] #
java-version: [1.8]
python-version: [3.6, 3.7, 3.8] #
awkward-version: ['awkward>=0.8.4']
name: test coffea (${{ matrix.os }}) - python ${{ matrix.python-version }}, JDK${{ matrix.java-version }}
steps:
- uses: actions/checkout@master
- run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- name: Set up Conda (Linux/MacOS)
if: matrix.os != 'windows-latest'
uses: goanpeca/setup-miniconda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}
miniconda-version: 'latest'
- name: Install dependencies (Linux/MacOS)
if: matrix.os != 'windows-latest'
run: |
python -m pip install -q --upgrade pip setuptools setuptools_scm wheel six pytest codecov
python -m pip install -q ${{ matrix.awkward-version }}
python -m pip install -q https://github.com/Parsl/parsl/zipball/master
python -m pip install -q -e .[parsl,dask,spark]
python -m pip list
java -version
- name: Install dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
python -m pip install -q --upgrade pip setuptools setuptools_scm wheel six pytest codecov
python -m pip install -q ${{ matrix.awkward-version }}
python -m pip install -q -e .
python -m pip list
- name: Test with pytest
env:
ARROW_PRE_0_15_IPC_FORMAT: 1
run: |
coverage run --source=coffea/ setup.py pytest
- name: Test work_queue
if: matrix.os == 'ubuntu-latest'
shell: bash -l {0}
run: |
conda create --name coffea-env-${{ matrix.python-version }} python=${{ matrix.python-version }}
conda activate coffea-env-${{ matrix.python-version }}
conda install -c conda-forge ndcctools dill six
python -m pip install -I .
cd tests
python wq.py
- name: Upload codecov
if: success() && matrix.os == 'ubuntu-latest' && matrix.python-version == 3.6
run: |
codecov
- name: Install graphviz
if: success()
uses: kamiazya/setup-graphviz@v1
- name: Install pandoc
if: success() && matrix.os == 'ubuntu-latest' && matrix.python-version == 3.6
uses: r-lib/actions/setup-pandoc@v1
- name: Build documentation
if: success() && matrix.os == 'ubuntu-latest' && matrix.python-version == 3.6
run: |
source docs/build_docs.sh
- name: Deploy documentation
if: success() && github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest' && matrix.python-version == 3.6
uses: crazy-max/[email protected]
with:
target_branch: gh-pages
build_dir: docs/build/html
env:
GITHUB_PAT: ${{ secrets.GITHUB_OAUTH }}