File tree 2 files changed +23
-21
lines changed 2 files changed +23
-21
lines changed Original file line number Diff line number Diff line change 10
10
IMAGE_NAME : samacommunity/sama-server
11
11
12
12
jobs :
13
- run_tests :
14
- if : |
15
- contains(github.event.pull_request.title, 'release') == true &&
16
- github.event.pull_request.merged == true &&
17
- github.event.pull_request.base.ref == 'main'
18
- runs-on : self-hosted
19
- steps :
20
- - uses : actions/checkout@v3
21
- - name : Build the SAMA resources
22
- run : docker compose -f docker-compose-full.yml up -d --build
23
-
24
- - name : Run migrations
25
- run : docker compose exec sama-server sh -c "MONGODB_URL=mongodb://172.25.0.4/samatests npm run migrate-mongo-up"
26
-
27
- - name : Run tests
28
- run : docker compose exec sama-server sh -c "MONGODB_URL=mongodb://172.25.0.4/samatests npm run test"
29
-
30
- - name : Stop the SAMA resources
31
- run : docker compose -f docker-compose-full.yml down -v --rmi all
32
-
33
13
create-release :
34
14
if : |
35
15
contains(github.event.pull_request.title, 'release') == true &&
36
16
github.event.pull_request.merged == true &&
37
17
github.event.pull_request.base.ref == 'main'
38
- needs : [run_tests]
39
18
runs-on : self-hosted
40
19
41
20
steps :
Original file line number Diff line number Diff line change
1
+ name : Docker Compose Test
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ run_tests :
10
+ runs-on : self-hosted
11
+ steps :
12
+ - uses : actions/checkout@v3
13
+ - name : Build the SAMA resources
14
+ run : docker compose -f docker-compose-full.yml up -d --build
15
+
16
+ - name : Run migrations
17
+ run : docker compose exec sama-server sh -c "MONGODB_URL=mongodb://172.25.0.4/samatests npm run migrate-mongo-up"
18
+
19
+ - name : Run tests
20
+ run : docker compose exec sama-server sh -c "MONGODB_URL=mongodb://172.25.0.4/samatests npm run test"
21
+
22
+ - name : Stop the SAMA resources
23
+ run : docker compose -f docker-compose-full.yml down -v --rmi all
You can’t perform that action at this time.
0 commit comments