Skip to content

chore(deps-dev): bump pytest-cov from 4.0.0 to 4.1.0 #63

chore(deps-dev): bump pytest-cov from 4.0.0 to 4.1.0

chore(deps-dev): bump pytest-cov from 4.0.0 to 4.1.0 #63

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
tags:
- '*'
workflow_dispatch:
jobs:
lint-and-test:
name: Lint and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
poetry-version: ['1.3.1']
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: |
poetry install --sync --all-extras --with dev
- name: Lint with black
run: |
poetry run black ./src --check
- name: Lint with mypy
run: |
poetry run mypy ./src
- name: Lint with flake8
run: |
poetry run flake8 ./src
- name: Lint with isort
run: |
poetry run isort ./src --check
- name: Check poetry lock file
run: |
poetry lock --check
release:
name: Release
env:
DIST_ARCHIVE_NAME: ${{ github.event.repository.name }}-dist
runs-on: ${{ matrix.os }}
needs: [lint-and-test]
if: startsWith(github.ref, 'refs/tags/')
strategy:
matrix:
python-version: ['3.7']
poetry-version: ['1.3.1']
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Build changelog
id: build_changelog
uses: mikepenz/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
configuration: '.github/config/changelog_configuration.json'
ignorePreReleases: 'false'
- name: Package release
uses: papeloto/action-zip@v1
with:
files: ./
recursive: false
dest: ${{ env.DIST_ARCHIVE_NAME }}-${{ steps.get_version.outputs.VERSION }}.zip
- name: Release
uses: softprops/action-gh-release@v1
with:
body: ${{steps.build_changelog.outputs.changelog}}
files: |
${{ env.DIST_ARCHIVE_NAME }}-${{ steps.get_version.outputs.VERSION }}.zip
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: "1.3.1"
- name: Poetry publish
shell: bash
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish --build