Skip to content

Bump version: 1.11.0 → 1.12.0 #302

Bump version: 1.11.0 → 1.12.0

Bump version: 1.11.0 → 1.12.0 #302

Workflow file for this run

name: Check code
on: [push]
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached dependencies
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction
- name: Lint with pre-commit
run: |
poetry run pre-commit run --all-files
test:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
pipx install poetry==1.3.2
poetry --version
poetry self show plugins
poetry config virtualenvs.in-project true
- name: Load cached dependencies
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: |
poetry env use python${{ matrix.python-version }}
poetry install --no-interaction
- name: Run pytest
run: |
# https://stackoverflow.com/a/16081218
EXIT_STATUS=0
poetry run pytest --cov=pyartifactory --cov-branch --cov-report=xml || EXIT_STATUS=$?
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.xml || EXIT_STATUS=$?
exit $EXIT_STATUS
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}