-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from Altonhe/feature/githubci
feat: docker image build and validation checks
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
image: | ||
name: Test Docker Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
# Split the build into two steps to identify which step fails | ||
- name: Build bundler image | ||
run: docker buildx build --load -t bundler-image:latest ./bundler | ||
|
||
- name: Build oba image | ||
run: docker buildx build --load -t oba-image:latest ./oba | ||
|
||
services: | ||
name: Test Services | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Docker Compose up | ||
run: docker-compose up -d | ||
|
||
- name: Wait for services to be up | ||
run: sleep 5 | ||
|
||
- name: Test the services | ||
run: | | ||
chmod +x ./bin/validate.sh | ||
./bin/validate.sh | ||
- name: Docker Compose down | ||
if: always() | ||
run: docker-compose down |