Skip to content

Commit

Permalink
Use Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pzehner committed Feb 22, 2024
1 parent 41d1794 commit e0f473a
Showing 1 changed file with 94 additions and 0 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Continuous integration

on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop

jobs:
unit-tests:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os:
- ubuntu-latest
- windows-latest

python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- uses: abatilo/actions-poetry@v2

- name: Setup virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}-${{ matrix.os }}

- name: Install dependencies
run: poetry install --no-ansi

- name: Tests
run: poetry run pytest --cov-report term

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

static-tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: "3.11"

- uses: abatilo/actions-poetry@v2

- name: Setup virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}-${{ matrix.os }}

- name: Install dependencies
run: poetry install --no-ansi

- name: Mypycode style
run: poetry run mypy . --check

- name: Black code style
run: poetry run black . --check

- name: Flake8 code style
run: poetry run flake8

- name: Isort code style
run: poetry run isort . --check

0 comments on commit e0f473a

Please sign in to comment.