Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 39 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,61 @@
# GitHub Actions Workflow created for testing and preparing the plugin release in following steps:
# - validate Gradle Wrapper,
# - run 'test' and 'verifyPlugin' tasks,
# - run Qodana inspections,
# - run 'buildPlugin' task and prepare artifact for the further tests,
# - run 'runPluginVerifier' task,
# - create a draft release.
#
# Workflow is triggered on push and pull_request events.
#
# GitHub Actions workflow for testing and preparing the plugin release.
# GitHub Actions reference: https://help.github.com/en/actions
#


name: Coder Gateway Plugin Build

on:
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g. for dependabot pull requests)
push:
branches: [ main ]
# Trigger the workflow on any pull request
branches:
- main
pull_request:

jobs:

# Run Gradle Wrapper Validation Action to verify the wrapper's checksum
# Run verifyPlugin, IntelliJ Plugin Verifier, and test Gradle tasks
# Build plugin and provide the artifact for the next workflow jobs
# Run plugin tests on every supported platform.
test:
strategy:
matrix:
platform:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3.5.0

- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
cache: gradle

- uses: gradle/wrapper-validation-action@v1.0.6

# Run tests
- run: ./gradlew test

# Collect Tests Result of failed tests
- if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests

# Run Gradle Wrapper Validation Action to verify the wrapper's checksum. Run
# verifyPlugin and IntelliJ Plugin Verifier. Build plugin and provide the
# artifact for the next workflow jobs.
build:
name: Build
needs: test
runs-on: ubuntu-latest
outputs:
version: ${{ steps.properties.outputs.version }}
changelog: ${{ steps.properties.outputs.changelog }}
steps:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v3.5.0

# Validate wrapper
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.0.6

# Setup Java 11 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v3
Expand All @@ -66,17 +81,6 @@ jobs:
echo "::set-output name=changelog::$CHANGELOG"
echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier"
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
# Run tests
- name: Run Tests
run: ./gradlew test

# Collect Tests Result of failed tests
- name: Collect Tests Result
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests

# Run plugin build
- name: Run Build
Expand Down Expand Up @@ -156,4 +160,4 @@ jobs:
--notes "$(cat << 'EOM'
${{ needs.build.outputs.changelog }}
EOM
)"
)"
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Coder Gateway Plugin
# Coder Gateway Plugin

[!["Join us on
Discord"](https://img.shields.io/badge/join-us%20on%20Discord-gray.svg?longCache=true&logo=discord&colorB=purple)](https://discord.gg/coder)
Expand Down Expand Up @@ -87,7 +87,9 @@ The properties listed define the plugin itself or configure the [gradle-intellij

### Testing

No functional or UI tests are available yet.
Run tests with `./gradlew test`. By default this will test against
`https://dev.coder.com` but you can set `CODER_GATEWAY_TEST_DEPLOYMENT` to a URL
of your choice or to `mock` to use mocks only.

### Code Monitoring

Expand Down Expand Up @@ -127,7 +129,8 @@ In the `.github/workflows` directory, you can find definitions for the following
- Triggered on `Publish release` event.
- Updates `CHANGELOG.md` file with the content provided with the release note.
- Publishes the plugin to JetBrains Marketplace using the provided `PUBLISH_TOKEN`.
- Sets publish channel depending on the plugin version, i.e. `1.0.0-beta` -> `beta` channel. For now, both `main` and `eap` branches are published on default release channel.
- Sets publish channel depending on the plugin version, i.e. `1.0.0-beta` -> `beta` channel. For now, both `main`
and `eap` branches are published on default release channel.
- Patches the Changelog and commits.

### Release flow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package com.coder.gateway.models
data class CoderWorkspacesWizardModel(
var coderURL: String = "https://coder.example.com",
var token: String = "",
var buildVersion: String = "",
var localCliPath: String = "",
var selectedWorkspace: WorkspaceAgentModel? = null,
var useExistingToken: Boolean = false
)
Loading