11
11
workflow_dispatch :
12
12
inputs :
13
13
debug_enabled :
14
- description : ' Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
14
+ description : " Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
15
15
required : false
16
- default : ' false'
16
+ default : " false"
17
17
18
18
jobs :
19
+ lint :
20
+ runs-on : ubuntu-latest
21
+ steps :
22
+ - name : Checkout
23
+ uses : actions/checkout@v4
24
+
25
+ - name : Set up Python
26
+ uses : actions/setup-python@v5
27
+ with :
28
+ python-version : " 3.10"
29
+ - run : docker compose build backend
30
+ - run : docker compose down -v --remove-orphans
31
+ - run : docker compose run -T backend bash /app/scripts/lint.sh
19
32
20
33
test :
21
34
runs-on : ubuntu-latest
@@ -26,18 +39,16 @@ jobs:
26
39
- name : Set up Python
27
40
uses : actions/setup-python@v5
28
41
with :
29
- python-version : ' 3.10'
42
+ python-version : " 3.10"
30
43
# Allow debugging with tmate
31
44
- name : Setup tmate session
32
45
uses : mxschmitt/action-tmate@v3
33
46
if : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
34
47
with :
35
48
limit-access-to-actor : true
36
- - run : docker compose build
49
+ - run : docker compose build backend
37
50
- run : docker compose down -v --remove-orphans
38
51
- run : docker compose up -d backend
39
- - name : Lint
40
- run : docker compose exec -T backend bash /app/scripts/lint.sh
41
52
- name : Run tests
42
53
run : docker compose exec -T backend bash /app/tests-start.sh "Coverage for ${{ github.sha }}"
43
54
- run : docker compose down -v --remove-orphans
@@ -48,10 +59,11 @@ jobs:
48
59
path : backend/htmlcov
49
60
50
61
# https://github.com/marketplace/actions/alls-green#why
51
- alls-green : # This job does nothing and is only used for the branch protection
62
+ alls-green : # This job does nothing and is only used for the branch protection
52
63
if : always()
53
64
needs :
54
65
- test
66
+ - lint
55
67
runs-on : ubuntu-latest
56
68
steps :
57
69
- name : Decide whether the needed jobs succeeded or failed
0 commit comments