-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (32 loc) · 1.29 KB
/
run-tests-in-container.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
name: (With Mongo) Tests inside a Container
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 40
if: "!contains(github.event.head_commit.message, 'CI Bot')"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Show OS Info
run: '[[ "$OSTYPE" == "linux-gnu"* ]] && { echo "OS Type: Linux"; (command -v lsb_release &> /dev/null && lsb_release -a) || cat /etc/os-release; uname -r; } || [[ "$OSTYPE" == "darwin"* ]] && { echo "OS Type: macOS"; sw_vers; uname -r; } || echo "Unsupported OS type: $OSTYPE"'
- name: Build Flowcept's image
run: make build
- name: Start dependent services (Mongo and Redis)
run: make services-mongo
- name: Run tests in container
run: make tests-in-container-mongo
- name: Stop services
run: make services-stop-mongo
- name: Start dependent services (Redis, no Mongo)
run: make services
- name: Run tests in container without mongo
run: make tests-in-container
- name: Stop services
run: make services-stop
- name: Clean up
run: |
make clean
find /home/runner/runners/ -type f -name "*.log" -exec sh -c 'echo {}; >"{}"' \; || true
docker image prune -a -f