-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (60 loc) · 1.74 KB
/
test_quick.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
58
59
60
61
62
63
64
65
66
67
68
name: Unit tests fast
on:
push:
branches-ignore:
- dev
- main
workflow_dispatch:
jobs:
basic-testing:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]
defaults:
run:
shell: bash -l {0}
steps:
- name: Git clone
uses: actions/checkout@v3
# See caching environments
# https://github.com/conda-incubator/setup-miniconda#caching-environments
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: env_qolmat_ci
use-mamba: true
- name: Get Date
id: get-date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
- name: Cache Conda env
uses: actions/cache@v2
with:
path: ${{ env.CONDA }}/envs
key:
conda-${{ runner.os }}--${{ runner.arch }}--${{
steps.get-date.outputs.today }}-${{
hashFiles('environment.ci.yml') }}-${{ env.CACHE_NUMBER
}}
env:
# Increase this value to reset cache if environment.ci.yml has not changed
CACHE_NUMBER: 0
id: cache
- name: Update environment
run: mamba env update -n env_qolmat_ci -f environment.ci.yml
if: steps.cache.outputs.cache-hit != 'true'
- name: Lint with flake8
run: |
flake8
- name: Test with pytest
run: |
make coverage
- name: Test docstrings
run: make doctest
- name: typing with mypy
run: |
mypy qolmat
echo you should uncomment mypy qolmat and delete this line