-
-
Notifications
You must be signed in to change notification settings - Fork 4
76 lines (65 loc) · 2.05 KB
/
mal_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
name: MyAnimeList CI
on: [workflow_dispatch]
permissions: read-all
concurrency:
group: mal-test
cancel-in-progress: true
jobs:
mal_ci:
name: MyAnimeList CI [${{ matrix.auth }}] (Java ${{ matrix.java }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
auth: ["Client", "Token"]
java: [8, 11, 17, 21, 23]
fail-fast: false
max-parallel: 1
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Java
uses: actions/setup-java@v4
with:
architecture: x64
distribution: temurin
java-version: ${{ matrix.java }}
- name: Load Client ID
if: matrix.auth == 'Client'
run: |
echo ${{ secrets.MAL_CLIENT }} > src/test/java/resources/client.txt
- name: Load OAuth Token
if: matrix.auth == 'Token'
run: |
echo ${{ secrets.MAL_TOKEN }} > src/test/java/resources/token.txt
- name: Test with Maven
continue-on-error: true
run: mvn test -fae --no-transfer-progress
- name: Check Token
run: |-
if [ "${{ secrets.KDEVBOT_PRIVATE_KEY }}" != '' ]
then
echo "authenticated=true" >> $GITHUB_ENV;
fi
- name: Authenticate
id: auth
if: ${{ env.authenticated }}
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.KDEVBOT_APP_ID }}
private-key: ${{ secrets.KDEVBOT_PRIVATE_KEY }}
owner: KatsuteDev
- name: Checkout JUnit Report
if: ${{ env.authenticated }}
uses: actions/checkout@v4
with:
repository: KatsuteDev/junit-report
ref: bc106f1790b25d6fe951a9baab3816fec37ac33d
path: ./.junit-report
token: ${{ steps.auth.outputs.token }}
- name: Generate Report
if: ${{ env.authenticated }}
uses: ./.junit-report
with:
job: MyAnimeList CI [${{ matrix.auth }}] (Java ${{ matrix.java }})
token: ${{ steps.auth.outputs.token }}