Skip to content

Commit

Permalink
#77: add GitHub workflow ci-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolkenfarmer committed Mar 16, 2024
1 parent 4e0c0ab commit 70bbb0f
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/ci-tests.yml
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

0 comments on commit 70bbb0f

Please sign in to comment.