-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Saucisse à roulettes
committed
Jun 10, 2023
1 parent
4b6ae55
commit fff911c
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |