File tree Expand file tree Collapse file tree 3 files changed +50
-62
lines changed Expand file tree Collapse file tree 3 files changed +50
-62
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : Run Test
2
+
3
+ on :
4
+ workflow_call :
5
+ pull_request :
6
+
7
+ permissions :
8
+ id-token : write # This is required for requesting the JWT
9
+ contents : read # This is required for actions/checkout
10
+
11
+ jobs :
12
+ test :
13
+ name : 🚴 Test 🚴
14
+ runs-on : ubuntu-latest
15
+
16
+ steps :
17
+ - uses : actions/checkout@main
18
+
19
+ - name : 🐳 Set up Docker Buildx
20
+ id : buildx
21
+ uses : docker/setup-buildx-action@v3
22
+
23
+ - name : 🐳 Build image
24
+ uses : docker/build-push-action@v6
25
+ with :
26
+ context : .
27
+ file : Dockerfile
28
+ push : false
29
+ tags : ifrcgo/go-api:latest
30
+ cache-from : type=gha
31
+ cache-to : type=gha,mode=max
32
+
33
+ - name : 🕮 Validate if there are no pending django migrations.
34
+ run : |
35
+ docker compose run --rm serve ./manage.py makemigrations --check --dry-run || {
36
+ echo 'There are some changes to be reflected in the migration. Make sure to run makemigrations';
37
+ exit 1;
38
+ }
39
+
40
+ - name : 🕮 Validate SentryMonitor config
41
+ run : |
42
+ docker compose run --rm serve ./manage.py cron_job_monitor --validate-only || {
43
+ echo 'There are some changes to be reflected in the SentryMonitor. Make sure to update SentryMonitor';
44
+ exit 1;
45
+ }
46
+
47
+ - name : 🤞 Run Test 🧪
48
+ run : |
49
+ time docker compose run --rm serve ./manage.py test --keepdb -v 2 --pattern="test_fake.py" &&
50
+ docker compose run --rm serve pytest --reuse-db --durations=10
File renamed without changes.
You can’t perform that action at this time.
0 commit comments