update yml

This commit is contained in:
Xavier Olive
2022-12-30 00:59:30 +01:00
parent a8f3b9c811
commit 6140f84058
2 changed files with 51 additions and 19 deletions

View File

@@ -27,18 +27,14 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
# Poetry cache depends on OS, Python version and Poetry version.
- name: Cache Poetry cache
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: poetry-cache-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ env.POETRY_VERSION }}
# virtualenv cache should depends on OS, Python version and `poetry.lock` (and optionally workflow files).
- name: Cache Packages
uses: actions/cache@v3
if: runner.os != 'windows-latest'
with:
path: ~/.local
path: |
~/.local
.venv
key: poetry-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }}
- name: Add poetry to windows path
@@ -53,12 +49,14 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Display Python version
run: poetry run python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
poetry install
- name: Type checking
if: ${{ env.PYTHON_VERSION != '3.7' }}
run: |
poetry run mypy pyModeS
@@ -67,7 +65,7 @@ jobs:
poetry run pytest tests --cov --cov-report term-missing
- name: Upload coverage to Codecov
if: ${{ github.event_name != 'pull_request_target' && env.PYTHON_VERSION == '3.10' }}
if: ${{ github.event_name != 'pull_request_target' }}
uses: codecov/codecov-action@v2
with:
env_vars: PYTHON_VERSION