-
Notifications
You must be signed in to change notification settings - Fork 192
36 lines (33 loc) · 1.04 KB
/
push.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
name: CI
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
on:
push:
branches: master
pull_request:
branches: master
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./piedpiper-web
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Scaffold Project
working-directory: ./
run: |
python -m pip install --upgrade pip
pip install --user cookiecutter
cookiecutter gh:agconti/cookiecutter-django-rest --checkout $BRANCH_NAME --no-input
- name: Build image
run: docker compose up -d --build
- name: Run Web tests
run: docker compose run --rm web bash -c "python3 -m flake8 . &&
python3 wait_for_postgres.py &&
python3 -Wall ./manage.py check --deploy &&
python3 -m pytest"