-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initialise CI workflow * Add CI for both repos
- Loading branch information
Showing
3 changed files
with
63 additions
and
28 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
name: Backend Docker Compose CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test-backend: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Compose | ||
run: sudo apt-get install docker-compose -y | ||
|
||
- name: Build and Run Docker Compose | ||
run: docker-compose up -d --build | ||
|
||
- name: Test Backend Health | ||
run: | | ||
sleep 10 # Allow time for services to start | ||
curl -f http://localhost:4000/api || exit 1 # Replace with actual backend health check endpoint | ||
- name: Stop and Remove Containers | ||
run: docker-compose down |
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,32 @@ | ||
name: Frontend Docker Compose CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test-frontend: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Compose | ||
run: sudo apt-get install docker-compose -y | ||
|
||
- name: Build and Run Docker Compose | ||
run: docker-compose up -d --build | ||
|
||
- name: Test Frontend Health | ||
run: | | ||
sleep 10 # Allow time for services to start | ||
curl -f http://localhost:3000 || exit 1 # Replace with actual frontend health check endpoint | ||
- name: Stop and Remove Containers | ||
run: docker-compose down | ||
|