Skip to content

Commit

Permalink
👷 Execute cypress tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Lysoun committed Feb 6, 2024
1 parent b9c475f commit 448552b
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,47 @@ jobs:
name: frontend-unit-tests-results # Name artifact for storage in cache
path: |
./modules/ui/test-output.xml
execute-ui-e2e-tests:
name: Execute UI end to end tests
runs-on: ubuntu-latest
needs: [build-and-test-backend, build-and-run-frontend-unit-tests]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run docker with db
working-directory: modules/app-server/docker
run: docker-compose up -d
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- name: Run server
run: ./gradlew :modules:app-server:app:run &
- name: Define node modules cache
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: modules/ui/yarn.lock
- name: Install UI dependencies
working-directory: modules/ui
run: yarn install
- name: Run UI
working-directory: modules/ui
run: npm run dev &
- name: Install Cypress and run tests
uses: cypress-io/github-action@v6
with:
wait-on: 'http://localhost:5173'
working-directory: modules/ui

publish-all-test-results:
name: Publish all tests results
runs-on: ubuntu-latest
needs: [build-and-test-backend, build-and-run-frontend-unit-tests]
needs: [build-and-test-backend, build-and-run-frontend-unit-tests, execute-ui-e2e-tests]
# the build-and-test job might be skipped, we don't need to run this job then
if: success() || failure()
permissions:
Expand Down

0 comments on commit 448552b

Please sign in to comment.