Skip to content

Commit

Permalink
Spin up registry before launching unit tests
Browse files Browse the repository at this point in the history
This commit adds a step to the tests workflow to spin up a
new registry before running all th tests.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@stacklok.com>
  • Loading branch information
puerco committed Apr 24, 2024
1 parent 4bc3667 commit 713640f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
on:
workflow_call:
workflow_dispatch:
jobs:
test:
name: Unit testing
Expand All @@ -23,8 +24,16 @@ jobs:
# copy config file into place
- name: Copy config file
run: cp config/server-config.yaml.example ./server-config.yaml
- name: Launch Registry
run: |
if [ "$(docker inspect -f '{{.State.Running}}' registry 2>/dev/null || true)" != 'true' ]; then
docker run -d --restart=always -p "127.0.0.1:5000:5000" --network bridge --name registry \
registry:2
fi
# Run the tests
- name: Run tests
env:
MINDER_TEST_REGISTRY: "localhost:5000"
run: make test-silent
cover:
name: Coverage
Expand Down

0 comments on commit 713640f

Please sign in to comment.