-
Notifications
You must be signed in to change notification settings - Fork 32
55 lines (55 loc) · 1.86 KB
/
main.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Test cookiecutter scaffolder
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
experimental_use_app_router: [
{name: "Page router", value: "False"},
{name: "App router", value: "True"},
]
name: Test ${{ matrix.experimental_use_app_router.name }}
steps:
- uses: actions/checkout@v4
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"
- name: Install cookiecutter
run: |
python -m pip install --upgrade pip
pip install cookiecutter
- name: Cleanup
run: |
set -x
rm -rf Company-Project
- name: Run cookiecutter
run: |
cookiecutter . --no-input experimental_use_app_router=${{ matrix.experimental_use_app_router.value }}
- name: Create docker compose config for running boilerplate tests
run: |
cp docker-compose-ci.yml Company-Project/docker-compose-ci.yml
- name: Build image
run: |
cd Company-Project
chmod +x src/docker-entrypoint.sh
docker compose -f docker-compose-ci.yml build
- name: Verify backend scaffolder
run: |
cd Company-Project
set -x
docker compose -f docker-compose-ci.yml run --rm python python manage.py new_page --name=Article
- name: Run tests on container
run: |
cd Company-Project
docker compose -f docker-compose-ci.yml run --rm python test
docker compose -f docker-compose-ci.yml run --rm python typecheck
docker compose -f docker-compose-ci.yml run --rm python lint
- name: Run frontend tests
run: |
cd Company-Project/frontend
npm ci
npm run test:ci
IGNORE_SENTRY=1 npm run build
npm run build-storybook