-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 1.02 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: CI
on:
pull_request:
branches:
- development
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11.4
- name: poetry cache
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry
- name: pre-commit-cache
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-venv-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Set up the environment
run: |
pip install -U pip
pip install poetry>=1.1.11
cd backend
poetry install
- name: Run pre-commit hooks
run: |
cd backend
poetry run pre-commit install -c ../.pre-commit-config.yaml
cd ..
make lint-all
- name: Run Tests
run: make test-backend