Skip to content

Update CI

Update CI #1

Workflow file for this run

name: Check source code
on:
push:
branches: [ "master" ]
paths-ignore:
- 'VERSION'
- 'LICENSE'
- '**.md'
- '.github/workflows/on_push.yml'
pull_request:
branches: [ "master" ]
paths-ignore:
- 'VERSION'
- 'LICENSE'
- '**.md'
- '.github/workflows/on_push.yml'
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH=$PATH:$HOME/.local/bin/
poetry install
- name: Lint with flake8
run: |
# stop the build if source code does not follows PEP8
poetry run flake8 . --count --show-source --statistics
check-types:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH=$PATH:$HOME/.local/bin/
poetry install
- name: Check types with mypy
run: |
poetry run mypy .
test:
runs-on: ubuntu-latest
needs: check-types
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH=$PATH:$HOME/.local/bin/
poetry install
- name: Test with pytest
run: |
poetry run pytest -v