-
Notifications
You must be signed in to change notification settings - Fork 13
42 lines (40 loc) · 1.34 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: JUG Tours CI
on: [push, pull_request]
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
- name: Run tests
run: xvfb-run mvn verify -ntp -Pprod
- name: Run e2e tests
uses: cypress-io/github-action@v6
with:
browser: chrome
start: mvn spring-boot:run -Pprod -ntp -f ../pom.xml
install: false
wait-on: http://localhost:8080
wait-on-timeout: 120
config: baseUrl=http://localhost:8080
working-directory: app
env:
OKTA_OAUTH2_ISSUER: ${{ secrets.OKTA_OAUTH2_ISSUER }}
OKTA_OAUTH2_CLIENT_ID: ${{ secrets.OKTA_OAUTH2_CLIENT_ID }}
OKTA_OAUTH2_CLIENT_SECRET: ${{ secrets.OKTA_OAUTH2_CLIENT_SECRET }}
CYPRESS_E2E_DOMAIN: ${{ secrets.CYPRESS_E2E_DOMAIN }}
CYPRESS_E2E_USERNAME: ${{ secrets.CYPRESS_E2E_USERNAME }}
CYPRESS_E2E_PASSWORD: ${{ secrets.CYPRESS_E2E_PASSWORD }}
- name: Upload screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: app/cypress/screenshots