-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (64 loc) · 1.81 KB
/
pr.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: pr
on:
pull_request:
types: [ opened, synchronize, edited ]
paths-ignore:
- .editorconfig
- .gitattributes
- .github/renovate.json
- .github/workflows/publish.yml
- .gitignore
- LICENSE
- Makefile
- README.md
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
env:
GITHUB_USER: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
verify:
runs-on: ubuntu-latest
container:
image: ghcr.io/danger/danger-kotlin:1.2.0
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: set up JDK 11
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 11
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: build
run: |
./gradlew clean
mkdir -p build/reports
./gradlew build --stacktrace 2>build/reports/build-error-log.txt
- name: lint and test
if: success()
run: ./gradlew --continue ktlintCheck test --stacktrace
- name: Upload lint and test reports
uses: actions/upload-artifact@v4
if: cancelled() != true
with:
name: reports
path: |
**/build/reports
**/build/test-results
retention-days: 7
- name: Run Danger-Kotlin
if: cancelled() != true
run: |
./gradlew installPluginFromLocal --stacktrace
danger-kotlin ci --failOnErrors --no-publish-check