-
Notifications
You must be signed in to change notification settings - Fork 41
88 lines (78 loc) · 2.66 KB
/
push.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
86
87
88
name: Commits Pushed
on:
push: #Trigger On Push
branches: [ "dev/**" ]
permissions:
contents: read
actions: read
checks: write
jobs:
check:
runs-on: ubuntu-latest
name: Compile and Run Checks
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.OPTIMIZATION_TOKEN }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 8
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Prepare Workspace
run: chmod +x gradlew ; ./gradlew setupDecompWorkspace
- name: Check for Compilation
run: ./gradlew compileJava
- name: Run Unit Tests
run: ./gradlew test
- name: Test Report
uses: phoenix-actions/test-reporting@v15
id: test-report # Set ID reference for step
if: success() || failure() # run this step even if previous step failed
with:
name: Tests # Name of the check run which will be created
path: build/test-results/test/TEST-*.xml # Path to test results
reporter: java-junit # Format of test results
notify-public-discord:
continue-on-error: true
name: Notify Public Discord
runs-on: ubuntu-latest
concurrency:
group: discord
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Notify Discord
if: ${{ github.ref == 'refs/heads/dev/main' }}
env:
COMMIT_FROM: ${{ github.event.before }}
COMMIT_TO: ${{ github.event.after }}
WEBHOOK: ${{ secrets.WH_PUSH_PUBLIC }}
REPO: ${{ github.repository }}
REPO_NAME: ${{ github.event.repository.custom_properties.project_pretty_name }}
run: chmod +rx ./gradle/tools/discord_commit.sh ; bash ./gradle/tools/discord_commit.sh -i
notify-internal-discord:
continue-on-error: true
name: Notify Internal Discord
runs-on: ubuntu-latest
concurrency:
group: discord
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Notify Discord
env:
COMMIT_FROM: ${{ github.event.before }}
COMMIT_TO: ${{ github.event.after }}
WEBHOOK: ${{ secrets.WH_PUSH_PRIVATE }}
REPO: ${{ github.repository }}
REPO_NAME: ${{ github.event.repository.custom_properties.project_pretty_name }}
run: chmod +rx ./gradle/tools/discord_commit.sh ; bash ./gradle/tools/discord_commit.sh -i