1919 shell : bash -l {0}
2020
2121 steps :
22- - name : Git clone
22+ - name : Checkout
2323 uses : actions/checkout@v3
2424
2525 # See caching environments
@@ -29,40 +29,27 @@ jobs:
2929 with :
3030 miniforge-variant : Mambaforge
3131 miniforge-version : latest
32- activate-environment : env_qolmat_ci
3332 use-mamba : true
33+ python-version : ${{ matrix.python-version }}
3434
3535 - name : Get Date
3636 id : get-date
3737 run : echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
3838
39- - name : Cache Conda env
39+ - name : Cache Poetry dependencies
4040 uses : actions/cache@v2
4141 with :
42- path : ${{ env.CONDA }}/envs
43- key :
44- conda-${{ runner.os }}--${{ runner.arch }}--${{
45- steps.get-date.outputs.today }}-${{
46- hashFiles('environment.ci.yml') }}-${{ env.CACHE_NUMBER
47- }}
48- env :
49- # Increase this value to reset cache if environment.ci.yml has not changed
50- CACHE_NUMBER : 0
51- id : cache
52-
53- - name : Update environment
54- run : mamba env update -n env_qolmat_ci -f environment.ci.yml
55- if : steps.cache.outputs.cache-hit != 'true'
56-
57- - name : Lint with flake8
58- run : |
59- flake8
60- - name : Test with pytest
61- run : |
62- make coverage
63- - name : Test docstrings
64- run : make doctest
65- - name : typing with mypy
66- run : |
67- mypy qolmat
68- echo you should uncomment mypy qolmat and delete this line
42+ path : |
43+ ~/.cache/pypoetry/cache
44+ ~/.cache/pypoetry/artifacts
45+ key : poetry-${{ runner.os }}-cache-${{ steps.get-date.outputs.today }}-${{ hashFiles('poetry.lock') }}
46+ restore-keys : |
47+ poetry-${{ runner.os }}-cache-
48+
49+ - name : Install Poetry
50+ run :
51+ mamba install -c conda-forge poetry -y
52+ poetry install
53+
54+ - name : Checkers
55+ run : make check-coverage check-types
0 commit comments