-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.34 KB
/
python-package-conda.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
name: Python Package using Conda
on:
push:
branches: [main]
paths:
- python/**
pull_request:
paths:
- python/**
schedule:
- cron: "0 0 * * 1"
jobs:
build-linux:
runs-on: ubuntu-latest
env:
working-directory: python/
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- 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 config --add channels conda-forge
conda env update --file environment.yml --name base
working-directory: ${{ env.working-directory }}
- name: Run Black
run: |
conda install black
black --check y2020/
working-directory: ${{ env.working-directory }}
- name: Run Mypy
run: |
conda install mypy
mypy y2020/
working-directory: ${{ env.working-directory }}
- name: Test with pytest
run: |
conda install pytest
pip install pytest-xdist[psutil]
# pytest 2019/python
pytest y2020
working-directory: ${{ env.working-directory }}