-
Notifications
You must be signed in to change notification settings - Fork 7
30 lines (30 loc) · 1008 Bytes
/
push.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
name: docker-compose-actions-workflow
on: push
jobs:
test:
runs-on:
# Github actions are stalling if we request more than one platform. Unsure why atm.
# - ubuntu-latest
- macos-latest
steps:
- name: Setup docker (if required)
if: contains(runner.os, 'ubuntu')
run: |
brew install docker docker-compose
colima start
- name: Checkout code
uses: actions/checkout@v4
- name: Build the stack
run: |
docker compose build
- name: Run the stack and check the output
run: |
docker compose up -d
echo "Checking expected output is produced"
sleep 10
CONSOLE_LOGGER_LOGS=$(docker compose logs console-logger -n 10)
docker compose down
echo "Console Logger output is:"
echo "$CONSOLE_LOGGER_LOGS"
SUCCESS_MARKER=$(echo "$CONSOLE_LOGGER_LOGS" | fgrep "This is one row of your data")
test -n "$SUCCESS_MARKER"