-
Notifications
You must be signed in to change notification settings - Fork 9
99 lines (86 loc) · 3.08 KB
/
build.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
89
90
91
92
93
94
95
96
97
98
99
name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVA_VERSION: 21
on:
pull_request:
push:
branches:
- develop
schedule:
- cron: "0 0 * * 0"
jobs:
test:
strategy:
matrix:
ide_version: [ "2023.1" ]
os: [ ubuntu, windows, macos ]
include:
# Run tests with latest platform version, but only on Linux
- ide_version: "2024.2"
os: ubuntu
name: Test ${{ matrix.ide_version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 45
steps:
- name: Fetch Sources
uses: actions/checkout@v4
- name: Gradle Wrapper Validation
uses: gradle/actions/wrapper-validation@v3
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
# https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limits-for-requests-from-github-actions
- name: Show GitHub Actions rate limit
shell: bash
# curl is unavailable on Windows
if: runner.os != 'Windows'
run: |
curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -i https://api.github.com/users/octocat | grep x-ratelimit
- name: Run Linters and Test
shell: bash
run: ./gradlew -PideVersion=${{ matrix.ide_version }} check
- name: Upload Test Reports
uses: actions/upload-artifact@v4
if: always()
with:
name: test-reports-${{ matrix.os }}-${{ matrix.ide_version }}
path: |
build/reports/
**/build/reports/
- name: Save AppMaps
uses: actions/cache/save@v4
if: runner.os == 'Linux' && matrix.ide_version == '2023.1'
with:
path: ./tmp/appmap
key: appmaps-${{ github.sha }}-${{ github.run_attempt }}
verify:
name: Verify Plugin
runs-on: ubuntu-latest
needs: [test]
timeout-minutes: 45
steps:
- name: Fetch Sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
- name: Verify Plugin Structure
shell: bash
run: ./gradlew verifyPlugin
- name: Run Plugin Verifier
shell: bash
run: ./gradlew verifyPlugin
appmap-analysis:
if: always()
needs: [test]
uses: getappmap/analyze-action/.github/workflows/appmap-analysis.yml@v1
permissions:
actions: read
contents: read
checks: write
pull-requests: write