1
+ ---
2
+ name : build
3
+ on : [push]
4
+ jobs :
5
+ conda-tests :
6
+ name : Test with conda (${{ matrix.os }})
7
+ runs-on : ${{ matrix.os }}
8
+ continue-on-error : ${{ matrix.experimental }}
9
+ strategy :
10
+ fail-fast : false
11
+ matrix :
12
+ include :
13
+ - os : ubuntu-18.04
14
+ pip_cache_path : ~/.cache/pip
15
+ experimental : false
16
+ - os : macos-latest
17
+ pip_cache_path : ~/Library/Caches/pip
18
+ experimental : false
19
+ defaults :
20
+ run :
21
+ shell : bash -l {0} # For conda
22
+ env :
23
+ # Increase this value to reset cache if conda.yml and requirements.txt
24
+ # have not changed
25
+ CACHE_NUMBER : 0
26
+ steps :
27
+ - uses : actions/checkout@v2
28
+ - name : Checkout and setup python
29
+ uses : actions/setup-python@v2
30
+ with :
31
+ python-version : 3.6
32
+ architecture : ' x64'
33
+
34
+ - name : Cache conda
35
+ uses : actions/cache@v2
36
+ with :
37
+ path : ~/conda_pkgs_dir # from: conda-incubator/setup-miniconda@v2
38
+ key : ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
39
+ hashFiles('conda.yml') }}
40
+
41
+ - name : Cache pip
42
+ uses : actions/cache@v2
43
+ with :
44
+ path : ${{ matrix.pip_cache_path }}
45
+ key : ${{ runner.os }}-pip--${{ env.CACHE_NUMBER }}-${{
46
+ hashFiles('requirements.txt') }}
47
+
48
+ - name : Conda environment setup
49
+ uses : conda-incubator/setup-miniconda@v2
50
+ with :
51
+ activate-environment : toxsmi
52
+ environment-file : conda.yml
53
+ auto-activate-base : false
54
+ use-only-tar-bz2 : true # This needs to be set for proper caching
55
+ auto-update-conda : true # Required for windows for `use-only-tar-bz2`
56
+
57
+ - name : Install dependencies and test code
58
+ run : |
59
+ pip3 install --no-cache-dir -r requirements.txt
60
+ pip3 install --no-deps .
61
+ python3 -c "import toxsmi"
62
+ python3 scripts/train_baselines.py -h
63
+ python3 scripts/train_tox.py -h
64
+
65
+ - name : Send Slack notification
66
+ uses : 8398a7/action-slack@v2
67
+ if : always()
68
+ with :
69
+ status : ${{ job.status }}
70
+ text : " CI Build ${{ matrix.os }}"
71
+ author_name : ${{ github.actor }}
72
+ env :
73
+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_HOOK_URL }}
74
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments