1
- # GitHub Actions Workflow created for testing and preparing the plugin release in following steps:
2
- # - validate Gradle Wrapper,
3
- # - run 'test' and 'verifyPlugin' tasks,
4
- # - run Qodana inspections,
5
- # - run 'buildPlugin' task and prepare artifact for the further tests,
6
- # - run 'runPluginVerifier' task,
7
- # - create a draft release.
8
- #
9
- # Workflow is triggered on push and pull_request events.
10
- #
1
+ # GitHub Actions workflow for testing and preparing the plugin release.
11
2
# GitHub Actions reference: https://help.github.com/en/actions
12
- #
13
-
14
3
15
4
name : Coder Gateway Plugin Build
5
+
16
6
on :
17
- # Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g. for dependabot pull requests)
18
7
push :
19
- branches : [ main ]
20
- # Trigger the workflow on any pull request
8
+ branches :
9
+ - main
21
10
pull_request :
22
11
23
12
jobs :
24
13
25
- # Run Gradle Wrapper Validation Action to verify the wrapper's checksum
26
- # Run verifyPlugin, IntelliJ Plugin Verifier, and test Gradle tasks
27
- # Build plugin and provide the artifact for the next workflow jobs
14
+ # Run plugin tests on every supported platform.
15
+ test :
16
+ strategy :
17
+ matrix :
18
+ platform :
19
+ - ubuntu-latest
20
+ - macos-latest
21
+ - windows-latest
22
+ runs-on : ${{ matrix.platform }}
23
+ steps :
24
+ - uses : actions/checkout@v3.5.0
25
+
26
+ - uses : actions/setup-java@v3
27
+ with :
28
+ distribution : zulu
29
+ java-version : 17
30
+ cache : gradle
31
+
32
+ - uses : gradle/wrapper-validation-action@v1.0.6
33
+
34
+ # Run tests
35
+ - run : ./gradlew test
36
+
37
+ # Collect Tests Result of failed tests
38
+ - if : ${{ failure() }}
39
+ uses : actions/upload-artifact@v3
40
+ with :
41
+ name : tests-result
42
+ path : ${{ github.workspace }}/build/reports/tests
43
+
44
+ # Run Gradle Wrapper Validation Action to verify the wrapper's checksum. Run
45
+ # verifyPlugin and IntelliJ Plugin Verifier. Build plugin and provide the
46
+ # artifact for the next workflow jobs.
28
47
build :
29
48
name : Build
49
+ needs : test
30
50
runs-on : ubuntu-latest
31
51
outputs :
32
52
version : ${{ steps.properties.outputs.version }}
33
53
changelog : ${{ steps.properties.outputs.changelog }}
34
54
steps :
35
-
36
55
# Check out current repository
37
56
- name : Fetch Sources
38
57
uses : actions/checkout@v3.5.0
39
58
40
- # Validate wrapper
41
- - name : Gradle Wrapper Validation
42
- uses : gradle/wrapper-validation-action@v1.0.6
43
-
44
59
# Setup Java 11 environment for the next steps
45
60
- name : Setup Java
46
61
uses : actions/setup-java@v3
66
81
echo "::set-output name=changelog::$CHANGELOG"
67
82
echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier"
68
83
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
69
- # Run tests
70
- - name : Run Tests
71
- run : ./gradlew test
72
-
73
- # Collect Tests Result of failed tests
74
- - name : Collect Tests Result
75
- if : ${{ failure() }}
76
- uses : actions/upload-artifact@v3
77
- with :
78
- name : tests-result
79
- path : ${{ github.workspace }}/build/reports/tests
80
84
81
85
# Run plugin build
82
86
- name : Run Build
@@ -156,4 +160,4 @@ jobs:
156
160
--notes "$(cat << 'EOM'
157
161
${{ needs.build.outputs.changelog }}
158
162
EOM
159
- )"
163
+ )"
0 commit comments