-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (35 loc) · 1.1 KB
/
Copy pathpull_request.yaml
File metadata and controls
41 lines (35 loc) · 1.1 KB
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
name: CI
on:
pull_request:
branches: [ master ]
types: [ opened, synchronize, reopened ]
permissions:
contents: read
id-token: write
env:
MAVEN_INIT: 'false'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version-file: .java-version
cache: maven
- name: Run tests
run: ./mvnw -V -B verify
- name: Scan with SonarCloud
if: github.repository == 'extenda/openapi-httpserver-java' && github.actor != 'dependabot[bot]'
uses: extenda/actions/sonar-scanner@v0
with:
sonar-host: https://sonarcloud.io
sonar-scanner: maven
main-branch: master
# Dependabot-triggered runs read the Dependabot secret store, where
# SECRET_AUTH does not exist. Fall back to the Dependabot-scoped key
# for those runs only.
service-account-key: ${{ github.actor == 'dependabot[bot]' && secrets.DEPENDABOT_AUTH || secrets.SECRET_AUTH }}