-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (50 loc) · 1.54 KB
/
ci_imageprep.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
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: [ 3.6, 3.7, 3.8 ]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
conda install pytest codecov pytest-cov tox flake8 -c conda-forge
python -m pip install --upgrade pip
pip install --user -r requirements.txt
- name: Lint with flake8
run: |
flake8 . --count --max-complexity=10 --max-line-length=99 --statistics
- name: Run Tox
run: |
tox -e py
- name: Cache conda
uses: actions/cache@v2
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('./environment.yml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: anaconda-client-env
channel-priority: strict
environment-file: ./environment.yml
use-only-tar-bz2: true