-
Notifications
You must be signed in to change notification settings - Fork 9
60 lines (53 loc) · 1.88 KB
/
java-tests.yaml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Java Tests
on:
schedule:
- cron: 0 */6 * * *
pull_request:
branches: [main]
workflow_dispatch:
inputs:
# trunk-ignore(checkov/CKV_GHA_7)
cli-version:
type: string
required: false
description:
The version of `analytics-cli` to use. Defaults to the latest specified in
`analytis-uploader`.
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: maven
- name: Run tests with Gradle
if: ${{ always() }}
uses: ./.github/actions/analytics-uploader-wrapper
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/gradle/**/test-results/**/*.xml"
run: gradle test --project-dir java/gradle
- name: Run tests with Maven
if: ${{ always() }}
uses: ./.github/actions/analytics-uploader-wrapper
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/surefire-reports/*.xml"
run: mvn test --file java/maven/pom.xml --quiet
- name: Run playwright tests with Maven
if: ${{ always() }}
uses: ./.github/actions/analytics-uploader-wrapper
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/playwright/**/surefire-reports/*.xml"
run: mvn test --file java/playwright/pom.xml --quiet