Skip to content

Commit

Permalink
fix: 🐛 Fix cypress never stopping on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
NadeigeC committed Jun 30, 2023
1 parent eaf77da commit c87eb9b
Show file tree
Hide file tree
Showing 4 changed files with 2,267 additions and 2,005 deletions.
54 changes: 29 additions & 25 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,39 @@ jobs:
tag-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Tag PR
uses: release-drafter/release-drafter@v5
with:
name: PR ${{ github.ref }}
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- name: Tag PR
uses: release-drafter/release-drafter@v5
with:
name: PR ${{ github.ref }}
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-and-test:
runs-on: ubuntu-latest
env:
BUILD_TARGET: 'test'
TAG: '2.0'
steps:
- uses: actions/checkout@v2
- name: Build for tests
run: |
echo "Building containers"
docker compose --profile e2e -f docker-compose-dev.yml config
docker compose --profile e2e -f docker-compose-dev.yml build
echo "Containers built"
- name: Run backend tests
run: make test-backend
env:
OS_USERNAME: ${{ secrets.OS_USERNAME }}
OS_PASSWORD: ${{ secrets.OS_PASSWORD }}
OS_PROJECT_NAME: ${{ secrets.OS_PROJECT_NAME }}
- name: Test frontend is alive
run: make test-frontend-alive
- name: Run frontend end-to-end tests
run: docker compose --profile e2e -f docker-compose-dev.yml up
- uses: actions/checkout@v2
- name: Build for tests
run: |
echo "Building containers"
docker compose --profile e2e -f docker-compose-dev.yml config
docker compose --profile e2e -f docker-compose-dev.yml build
echo "Containers built"
- name: Run backend tests
run: make test-backend
env:
OS_USERNAME: ${{ secrets.OS_USERNAME }}
OS_PASSWORD: ${{ secrets.OS_PASSWORD }}
OS_PROJECT_NAME: ${{ secrets.OS_PROJECT_NAME }}
- name: Test frontend is alive
run: make test-frontend-alive
- name: Launch app (backend & frontend)
run: docker compose --profile app -f docker-compose-dev.yml up -d
- name: Run frontend end-to-end tests
run: docker compose --profile e2e-only -f docker-compose-dev.yml up
- name: Close app (backend & frontend)
run: docker compose --profile app -f docker-compose-dev.yml down
1 change: 1 addition & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ services:
- frontend
- backend
profiles:
- e2e-only
- e2e
container_name: basegun-cypress
build:
Expand Down
Loading

0 comments on commit c87eb9b

Please sign in to comment.