-
Notifications
You must be signed in to change notification settings - Fork 25
62 lines (56 loc) · 1.69 KB
/
Copy pathpython-tests.yml
File metadata and controls
62 lines (56 loc) · 1.69 KB
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
56
57
58
59
60
61
name: Python tests
on:
push:
branches: [ master, ]
paths:
- '**.py'
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
paths:
- '**.py'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
test-linux:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
max-parallel: 5
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Set up Python 3.13.5
uses: actions/setup-python@v2
with:
python-version: 3.13.5
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.13.5
installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
allow-softlinks: true
show-channel-urls: true
use-only-tar-bz2: true
- name: Set environment variables
run: echo "ONAV_ENV_FILE=oceannavigator/configs/testing.env" >> $GITHUB_ENV ; echo "ONAV_ICECHUNK_STORAGE_CONFIG='{"path":"tests/testdata/icechunk"}'" >> $GITHUB_ENV
- name: Update environment
run: mamba env update -f config/conda/environment.yml --name test --quiet
- name: Run tests (activate)
run: |
echo PROJ_LIB=$CONDA_BASE/share/proj >> $GITHUB_ENV
# initialize mamba for the current bash shell
eval "$(mamba shell hook --shell bash)"
mamba activate test
# optional sanity checks
which python
python --version
./run_python_tests.sh
shell: bash -l {0}