-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (79 loc) · 2.79 KB
/
ci.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
78
79
80
81
82
83
84
85
name: Test CI (v3)
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Build check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Generate jacocoTestReport
run: ./gradlew jacocoTestReport
- name: Upload jacocoTestReport to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
fail_ci_if_error: true
directory: /home/runner/work/REMINDER_ANDROID/REMINDER_ANDROID/
- name: action-slack
uses: 8398a7/action-slack@v3
with:
status: custom
fields: job,commit,author,pullRequest,took
mention: here,
if_mention: failure,cancelled,
custom_payload: |
{
text: 'Github Actions 알림',
attachments: [{
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning',
title: 'Pull Request CI 가 완료됐어!',
text: '아래에 상세한 내용이 있으니, 살펴보면 좋을 것 같아 😆',
fields: [
{
title: 'title',
value: `\`${process.env.AS_PULL_REQUEST}\``,
short: true
},
{
title: 'ci result',
value: '${{ job.status }}' === 'success' ? '\`성공\`' : '${{ job.status }}' === 'failure' ? '\`실패\`' : '\`중단\`',
short: true
},
{
title: 'author',
value: `\`${process.env.AS_AUTHOR}\``,
short: true
},
{
title: 'job',
value: `\`${process.env.AS_JOB}\``,
short: true
},
{
title: 'commit',
value: `\`${process.env.AS_COMMIT}\``,
short: true
},
{
title: 'took',
value: `\`${process.env.AS_TOOK}\``,
short: true
}
],
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_CI_URL }}
if: always()