Skip to content

Commit

Permalink
Initialise ci (#118)
Browse files Browse the repository at this point in the history
* Initialise CI workflow

* Add CI for both repos
  • Loading branch information
Jajared authored Nov 10, 2024
1 parent 473535b commit d6bfdef
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 28 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/ci-workflow.yaml

This file was deleted.

31 changes: 31 additions & 0 deletions backend/.github/ci-workflow.yaml
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
32 changes: 32 additions & 0 deletions frontend/.github/ci-workflow.yaml
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

0 comments on commit d6bfdef

Please sign in to comment.