Skip to content

Commit

Permalink
add(CI): ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Saucisse à roulettes committed Jun 10, 2023
1 parent 4b6ae55 commit fff911c
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Checks

on:
workflow_dispatch:
push:

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local
key: check-poetry

- name: Install and configure Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1

- name: Load cached venv
id: cached-venv
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-

- name: Install dependencies
if: steps.cached-venv.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --with=dev

- name: Check syntax
run: poetry run black src --check

- name: Check typing
run : poetry run mypy

- name: Run pytest
run: poetry run pytest

0 comments on commit fff911c

Please sign in to comment.