@@ -22,64 +22,59 @@ jobs:
22
22
fail-fast : false
23
23
matrix :
24
24
version :
25
- - ' 1.9 '
26
- python : [3.9]
27
- os :
28
- - ubuntu -latest
25
+ - ' 1.10 '
26
+ python :
27
+ - ' 3.10 '
28
+ os : [ubuntu-latest, macos -latest]
29
29
arch :
30
30
- x64
31
31
steps :
32
- - uses : actions/checkout@v2
32
+ # Cancel ongoing CI test runs if pushing to branch again before the previous tests
33
+ # have finished
34
+ - name : Cancel ongoing test runs for previous commits
35
+ uses : styfle/cancel-workflow-action@0.12.1
36
+ with :
37
+ access_token : ${{ github.token }}
38
+ # Do tests
39
+ - uses : actions/checkout@v4
33
40
- name : Set up Python 🐍 ${{ matrix.python }}
34
41
uses : actions/setup-python@v2
35
42
with :
36
- python-version : ${{ matrix.python }}
37
- - name : Create environment with micromamba 🐍🖤
38
- uses : mamba-org/setup-micromamba@v1
39
- with :
40
- micromamba-version : ' 1.5.6-0'
41
- environment-file : ./environment.yml
42
- environment-name : oggm_env # it is recommendable to add both name and yml file.
43
- init-shell : bash
44
- cache-environment : true
45
- # condarc-file: ./condarc.yml # If necessary, we can include .condarc to configure environment
46
- - name : Test creation of environment with micromamba 🔧🐍🖤
47
- run : |
48
- which python
49
- conda env export
50
- shell : bash -el {0}
51
- - name : Update certifi
52
- run : |
53
- pip install --upgrade certifi
54
- shell : bash -el {0}
55
- # - name: Test OGGM installation 🔧🌎
56
- # run: pytest.oggm
57
- # shell: bash -el {0}
58
- - name : Set ENV Variables for PyCall.jl 🐍 📞
59
- run : export PYTHON=/home/runner/micromamba/envs/oggm_env/bin/python
43
+ python-version : ${{ matrix.python }}
44
+ - name : Install certifi and set SSL_CERT_FILE
45
+ run : |
46
+ pip install --upgrade certifi
47
+ echo "SSL_CERT_FILE=$(python -c 'import certifi; print(certifi.where())')" >> $GITHUB_ENV
60
48
shell : bash -el {0}
61
- - uses : julia-actions/setup-julia@v1
49
+ - uses : julia-actions/setup-julia@latest
62
50
with :
63
51
version : ${{ matrix.version }}
64
52
arch : ${{ matrix.arch }}
65
53
- name : Check Julia SSL certifications 🔎🔐
66
54
run : julia -e 'using NetworkOptions; println(NetworkOptions.bundled_ca_roots()); println(NetworkOptions.ca_roots())'
67
55
shell : bash -el {0}
68
- - uses : julia-actions/cache@v1
56
+ - uses : julia-actions/cache@v2
69
57
with :
70
58
cache-registries : " true"
71
59
cache-compiled : " true"
60
+ - uses : actions/cache@v4
61
+ env :
62
+ cache-name : cache-artifacts
63
+ with :
64
+ path : ~/.julia/artifacts
65
+ key : ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
66
+ restore-keys : |
67
+ ${{ runner.os }}-test-${{ env.cache-name }}-
68
+ ${{ runner.os }}-test-
69
+ ${{ runner.os }}-
72
70
- uses : julia-actions/julia-buildpkg@v1
73
71
env :
74
- PYTHON : /home/runner/micromamba/envs/oggm_env/bin/python
75
- # The SSL certificate path can be readed from the action "Check Julia SSL certifications"
76
- SSL_CERT_FILE : /etc/ssl/certs/ca-certificates.crt
77
- - uses : julia-actions/julia-runtest@v1
72
+ JULIA_SSL_CA_ROOTS_PATH : " "
73
+ - uses : julia-actions/julia-runtest@latest
78
74
env :
79
- PYTHON : /home/runner/micromamba/envs/oggm_env/bin/python
80
- SSL_CERT_FILE : /etc/ssl/certs/ca-certificates.crt
75
+ JULIA_SSL_CA_ROOTS_PATH : " "
81
76
- uses : julia-actions/julia-processcoverage@v1
82
- - uses : codecov/codecov-action@v3
77
+ - uses : codecov/codecov-action@v4
83
78
with :
84
79
token : ${{secrets.CODECOV_TOKEN}}
85
80
files : lcov.info
0 commit comments