-
-
Notifications
You must be signed in to change notification settings - Fork 11
52 lines (48 loc) · 1.63 KB
/
run-unit-tests_conda-forge.yml
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
name: Tests (conda-forge)
on:
# push:
# branches: [main, feature_pytest_click]
# pull_request:
# branches: [main]
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v4 # for the test data
- name: Get Date
id: get-date
run: echo "week=$(/bin/date -u '+%Y%U')" >> $GITHUB_OUTPUT
shell: bash
- name: Cache conda
uses: actions/cache@v4
with:
# path: ~/conda_pkgs_dir
# key: ${{ runner.os }}-${{ matrix.python-version }}-${{ steps.get-date.outputs.week }}-${{ hashFiles('pyproject.toml') }}
path: ${{ env.CONDA }}/envs
key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}-${{ steps.get-date.outputs.week }}-${{ hashFiles('pyproject.toml') }}
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: true
activate-environment: test
auto-update-conda: false
conda-solver: libmamba
- name: Install dependencies
run: |
conda info
conda install -c conda-forge rasterio opencv click tqdm pyyaml fsspec requests aiohttp pytest pytest-cov
conda list
if: steps.cache.outputs.cache-hit != 'true'
- name: Run unit tests
run: |
python -m pytest --cov=orthority --cov-report=term-missing --cov-report=xml:coverage.xml ./tests