-
Notifications
You must be signed in to change notification settings - Fork 4
34 lines (27 loc) · 944 Bytes
/
test.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
name: Run tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v2
- name: Build containers
run: |
docker buildx create --use --driver=docker-container
cd docker/dev
docker buildx bake -f docker-compose.yml web --set *.cache-to="type=gha,mode=min" --set *.cache-from="type=gha" --load
- name: Run tests
run: >-
docker compose -f docker/dev/docker-compose.yml run --rm web
/bin/sh -c
"coverage run --concurrency=multiprocessing ./manage.py test --parallel 4 --shuffle --timing --settings=asu.settings.test --no-input && coverage combine && coverage xml"
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}