Skip to content

Commit

Permalink
CI: make worflows re-usable
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Feb 18, 2023
1 parent eaa3fd5 commit eb39811
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,18 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@2dd22fa31c04297d369158eb483250f578504a9f
- uses: docker/setup-buildx-action@v2.4.1

- name: Start containers
run: docker-compose up --build --force-recreate --detach
run: docker-compose up --build --force-recreate --detach opi-test

- name: Run Tests
run: |
set -x
name=$(docker-compose ps | grep opi-smbios-test | awk '{print $1}')
name=$(docker-compose ps | grep opi-test | awk '{print $1}')
rc=$(docker wait "${name}")
if [ "${rc}" != "0" ]; then
echo "opi-smbios-test failed:"
echo "opi-test failed:"
docker logs "${name}"
exit 1
fi
Expand All @@ -86,4 +86,4 @@ jobs:

- name: Stop containers
if: always()
run: docker-compose down
run: docker-compose down --volumes --remove-orphans
1 change: 1 addition & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Go

on:
workflow_dispatch:
workflow_call:
push:
branches: [ "main" ]
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Linters

on:
workflow_dispatch:
workflow_call:
push:
branches: [ main ]
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
healthcheck:
test: grpcurl -plaintext localhost:50051 list || exit 1

opi-smbios-test:
opi-test:
image: namely/grpc-cli
networks:
- opi
Expand Down

0 comments on commit eb39811

Please sign in to comment.