-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e0c0ab
commit 70bbb0f
Showing
1 changed file
with
66 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,66 @@ | ||
name: CI Tests | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-test-frontend: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Build frontend Docker container | ||
run: | | ||
cd ./frontend/ | ||
docker-compose up | ||
build-and-test-backend: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Build backend Docker containers | ||
run: | | ||
cd ./backend/dps_training_k/ | ||
docker pull redis:latest | ||
docker-compose up | ||
- name: Run backend tests | ||
run: docker exec -it K-dPS-django python3 manage.py test | ||
|
||
test-integration: | ||
needs: [build-and-test-frontend, build-and-test-backend] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Build frontend Docker container | ||
run: | | ||
cd ./frontend/ | ||
docker-compose up | ||
- name: Build backend Docker containers | ||
run: | | ||
cd ./backend/dps_training_k/ | ||
docker pull redis:latest | ||
docker-compose up | ||
- name: Run integration tests | ||
run: | | ||
cd ./frontend/ | ||
npm install cypress --save-dev | ||
npx cypress run --e2e | ||