Skip to content

Commit 548c725

Browse files
committed
Test on macOS and Windows
Since the comments are now out of date I removed them; I figure it is more or less as easy to just read the workflow to see what it does.
1 parent fda6c44 commit 548c725

File tree

1 file changed

+39
-35
lines changed

1 file changed

+39
-35
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,61 @@
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.
112
# GitHub Actions reference: https://help.github.com/en/actions
12-
#
13-
143

154
name: Coder Gateway Plugin Build
5+
166
on:
17-
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g. for dependabot pull requests)
187
push:
19-
branches: [ main ]
20-
# Trigger the workflow on any pull request
8+
branches:
9+
- main
2110
pull_request:
2211

2312
jobs:
2413

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.
2847
build:
2948
name: Build
49+
needs: test
3050
runs-on: ubuntu-latest
3151
outputs:
3252
version: ${{ steps.properties.outputs.version }}
3353
changelog: ${{ steps.properties.outputs.changelog }}
3454
steps:
35-
3655
# Check out current repository
3756
- name: Fetch Sources
3857
uses: actions/checkout@v3.5.0
3958

40-
# Validate wrapper
41-
- name: Gradle Wrapper Validation
42-
uses: gradle/wrapper-validation-action@v1.0.6
43-
4459
# Setup Java 11 environment for the next steps
4560
- name: Setup Java
4661
uses: actions/setup-java@v3
@@ -66,17 +81,6 @@ jobs:
6681
echo "::set-output name=changelog::$CHANGELOG"
6782
echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier"
6883
./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
8084
8185
# Run plugin build
8286
- name: Run Build
@@ -156,4 +160,4 @@ jobs:
156160
--notes "$(cat << 'EOM'
157161
${{ needs.build.outputs.changelog }}
158162
EOM
159-
)"
163+
)"

0 commit comments

Comments
 (0)