generated from cortinico/kotlin-gradle-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (37 loc) · 1.14 KB
/
pre-merge.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
name: Pre Merge Checks
on:
# push:
# branches:
# - main
pull_request:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
validation:
name: Gradle wrapper validation
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
gradle:
name: Run checks and build graphs
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Cache Gradle Caches
uses: gradle/gradle-build-action@v2
- name: Run Gradle tasks
run: ./gradlew preMerge --continue
- name: Generate graphs
run: ./gradlew :example:dependencyGraph
if: success()
- name: Verify the root graph file exists but system-test graph doesn't
run: test -f "./dependencyGraph.md" && test ! -f "./example/system-test/dependencyGraph.md"
if: success()