Skip to content

Bump version to 2.0.0 #4

Bump version to 2.0.0

Bump version to 2.0.0 #4

Workflow file for this run

name: Python workflow
on:
push:
branches:
- '**'
jobs:
cache:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
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 --no-root
test:
runs-on: ubuntu-latest
needs: cache
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Testing
run: |
source .venv/bin/activate
pytest
- name: Linting
run: |
source .venv/bin/activate
ruff check . --output-format=full
build:
runs-on: ubuntu-latest
needs: test
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }}
concurrency:
group: "build"
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Build a package
run: |
source .venv/bin/activate
poetry build
- name: Publish as an artifact
uses: actions/upload-artifact@v3
with:
name: Wheel (Python 3.10)
path: dist/*.whl