mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-05 20:51:49 +02:00
CI test with docker compose
This commit is contained in:
parent
0f599ff99c
commit
e4eb8924ee
2 changed files with 21 additions and 3 deletions
12
.github/workflows/dockerhub.yml
vendored
12
.github/workflows/dockerhub.yml
vendored
|
@ -11,6 +11,15 @@ env:
|
|||
TEST_TAG: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:test
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Test image
|
||||
run: docker compose -f docker-compose.test.yml run sut
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -55,6 +64,3 @@ jobs:
|
|||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
||||
- name: Test image
|
||||
run: docker run --rm ${{ env.TEST_TAG }}
|
||||
|
|
12
docker-compose.test.yml
Normal file
12
docker-compose.test.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
version: "3.9"
|
||||
|
||||
services:
|
||||
ihatemoney:
|
||||
build: .
|
||||
ports:
|
||||
- "8000:8000"
|
||||
sut:
|
||||
image: alpine
|
||||
command: wget --spider ihatemoney:8000
|
||||
depends_on:
|
||||
- ihatemoney
|
Loading…
Reference in a new issue