Skip to content

Commit 3e5696f

Browse files
🔄 synced local '.github/workflows/CI.yml' with remote '.github/workflows/CI.yml'
1 parent 1dbbcc1 commit 3e5696f

File tree

1 file changed

+33
-38
lines changed

1 file changed

+33
-38
lines changed

.github/workflows/CI.yml

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -22,64 +22,59 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
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]
2929
arch:
3030
- x64
3131
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
3340
- name: Set up Python 🐍 ${{ matrix.python }}
3441
uses: actions/setup-python@v2
3542
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
6048
shell: bash -el {0}
61-
- uses: julia-actions/setup-julia@v1
49+
- uses: julia-actions/setup-julia@latest
6250
with:
6351
version: ${{ matrix.version }}
6452
arch: ${{ matrix.arch }}
6553
- name: Check Julia SSL certifications 🔎🔐
6654
run: julia -e 'using NetworkOptions; println(NetworkOptions.bundled_ca_roots()); println(NetworkOptions.ca_roots())'
6755
shell: bash -el {0}
68-
- uses: julia-actions/cache@v1
56+
- uses: julia-actions/cache@v2
6957
with:
7058
cache-registries: "true"
7159
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 }}-
7270
- uses: julia-actions/julia-buildpkg@v1
7371
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
7874
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: ""
8176
- uses: julia-actions/julia-processcoverage@v1
82-
- uses: codecov/codecov-action@v3
77+
- uses: codecov/codecov-action@v4
8378
with:
8479
token: ${{secrets.CODECOV_TOKEN}}
8580
files: lcov.info

0 commit comments

Comments
 (0)