-
Notifications
You must be signed in to change notification settings - Fork 405
77 lines (62 loc) · 2.56 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Maven
on:
pull_request:
branches: [ "master" ]
jobs:
build:
# To be able to write/remove comments on PR
permissions:
pull-requests: write
name : Code Check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: Check No Merge Commit
uses: ./.github/actions/no_merge
- name: Build
if: always()
id: build
uses: ./.github/actions/build
- name: Generate Javadoc
if: ${{ always() && steps.build.conclusion == 'success' }}
uses: ./.github/actions/javadoc
- name: Unit Tests
id: unit_tests
if: ${{ always() && steps.build.conclusion == 'success' }}
uses: ./.github/actions/unit-tests
- name: Integration Tests
id: integration_tests
if: ${{ always() && steps.build.conclusion == 'success' }}
uses: ./.github/actions/integration-tests
- name: Report Test Failure
uses: mikepenz/action-junit-report@v3
if: ${{ always() && (steps.unit_tests.conclusion == 'failure' || steps.integration_tests.conclusion == 'failure') }}
with:
check_name: Automatic Tests Report
report_paths: '**/target/surefire-reports/*.xml'
fail_on_failure: true
- name: Add Tips comment
if: failure()
uses: marocchino/sticky-pull-request-comment@v2
with:
header: Refine your PR
message: |
:information_source: Some tips :
- Once you fix your issues locally, **do not create a new PR**, see [how to refine your PR](https://github.com/eclipse/leshan/wiki/How-to-contribute#refine-it).
- See [How to contribute](https://github.com/eclipse/leshan/wiki/How-to-contribute) guide and some [Code & design guidelines](https://github.com/eclipse/leshan/wiki/Code-&-design-guidelines).
If documentation or those automatic comments are not clear enough, please [create a new issue](https://github.com/eclipse/leshan/issues/new) to discus about how to enhance it.
- name: Delete Tips comment
if: success()
uses: marocchino/sticky-pull-request-comment@v2
with:
header: Refine your PR
delete: true