1
1
name : cgatcore
2
2
3
- on :
4
- push :
5
- branches :
6
- - main
7
- pull_request :
8
- branches :
9
- - main
3
+ on : [push, pull_request]
10
4
11
5
jobs :
12
6
build :
13
- name : " Ex1 (${{ matrix.python-version }}, ${{ matrix.os }})"
7
+ name : Ex1 (${{ matrix.python-version }}, ${{ matrix.os }})
14
8
runs-on : ${{ matrix.os }}
15
9
16
10
strategy :
@@ -25,48 +19,41 @@ jobs:
25
19
26
20
steps :
27
21
- uses : actions/checkout@v3
28
-
29
22
- name : Cache conda
30
23
uses : actions/cache@v3
31
- with :
32
- path : ~/conda_pkgs_dir
33
- key : ${{ runner.os }}-conda-${{ hashFiles('conda/environments/cgat-core.yml') }}
34
24
env :
35
- # Adjust this value if the conda environment changes
25
+ # Increase this value to reset cache if conda/environments/cgat-core.yml has not changed
36
26
CACHE_NUMBER : 0
37
-
27
+ with :
28
+ path : ~/conda_pkgs_dir
29
+ key : ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('conda/environments/cgat-core.yml') }}
38
30
- name : Set installer URL
39
31
id : set-installer-url
40
32
run : |
41
- if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
33
+ if [[ "${{ matrix.os }}" == "ubuntu-latest" ] ]; then
42
34
echo "installer-url=https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh" >> $GITHUB_ENV
43
- elif [ "${{ matrix.os }}" = "macos-latest" ]; then
35
+ elif [[ "${{ matrix.os }}" == "macos-latest" ] ]; then
44
36
echo "installer-url=https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh" >> $GITHUB_ENV
45
37
fi
46
-
47
- - name : Set up Miniconda
48
- uses : conda-incubator/setup-miniconda@v2
38
+ - uses : conda-incubator/setup-miniconda@v2
49
39
with :
50
40
installer-url : ${{ env.installer-url }}
51
41
python-version : ${{ matrix.python-version }}
52
42
channels : conda-forge, bioconda, defaults
53
43
channel-priority : true
54
44
activate-environment : cgat-core
55
45
environment-file : conda/environments/cgat-core.yml
56
-
57
46
- name : Configure Conda Paths
58
- run : echo "$(conda info --base)/condabin" >> $GITHUB_PATH
59
-
60
- - name : Show Conda Information
47
+ run : echo "/usr/share/miniconda3/condabin" >> $GITHUB_PATH
48
+ - name : Show conda
61
49
run : |
62
50
conda info
63
51
conda list
64
-
65
52
- name : Test
66
53
run : |
67
54
pip install .
68
55
./all-tests.sh
69
-
56
+
70
57
deploy_docs :
71
58
name : Deploy MkDocs Documentation
72
59
runs-on : ubuntu-latest
86
73
- name : Build and Deploy MkDocs Site
87
74
run : mkdocs gh-deploy --force --clean
88
75
env :
89
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
76
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments