-
Notifications
You must be signed in to change notification settings - Fork 41
57 lines (50 loc) · 1.48 KB
/
ci.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
53
54
55
56
57
name: D4LF - CI
on: [pull_request]
env:
# To force cache update
CACHE_NUMBER: 1
jobs:
tests:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: d4lf
python-version: '3.11'
use-mamba: true
- name: Cache Conda env
uses: actions/cache@v2
with:
path: ${{ env.CONDA }}/envs
key:
conda-${{ runner.os }}--${{ runner.arch }}--${{ hashFiles('environment.yml') }}-${{ env.CACHE_NUMBER }}
id: cache
- name: Update environment
run:
mamba env update -n d4lf -f
environment.yml
if: steps.cache.outputs.cache-hit != 'true'
- name: Powershell Core
shell: powershell
run: |
conda info
conda list
- name: Pytest & Coverage
shell: powershell
run: |
C:\Miniconda\condabin\conda.bat activate d4lf
python -c "import sys; print(sys.version)"
coverage run --source=./src -m pytest -v -s
- name: Coverage Report Generation
shell: powershell
run: |
C:\Miniconda\condabin\conda.bat activate d4lf
coverage xml
- name: Lint black formatting
shell: powershell
run: black --check ./**/*.py