Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c2f1378
add content
vol0n Feb 27, 2022
74dd383
Refactor grpc related logic (#336)
EgorkaKulikov Jul 25, 2022
d3477d1
fix: logs on windows
vol0n Jul 26, 2022
fe5070f
Merge branch 'vol0n/clion_plugin' of https://github.com/UnitTestBot/U…
vol0n Jul 26, 2022
4ae7f4e
Refactor actions and their neighborhood (#346)
EgorkaKulikov Jul 26, 2022
dffca68
Little improvements related to TODOs in code of CLion plugin (#351)
vol0n Jul 26, 2022
60ae0c7
Refactor settings in CLion plugin (#350)
EgorkaKulikov Jul 27, 2022
95b7b9a
Skip coverage line indexes which are out of bounds
vol0n Jul 28, 2022
13cab18
rename client -> currentClient
vol0n Jul 28, 2022
bb17d56
Add comments on initialization
vol0n Jul 28, 2022
2e850e8
Refactor UI and Utils related logic (#357)
EgorkaKulikov Jul 29, 2022
0dfe869
Refactor some other pieces of code (#358)
EgorkaKulikov Jul 29, 2022
131bf02
Add refresh action, show busy icon on refresh (#361)
vol0n Aug 1, 2022
36f99db
Improve some texts in CLion plugin (#362)
EgorkaKulikov Aug 1, 2022
5412cf3
Fix: do not show canceled notification on error
vol0n Aug 1, 2022
ea42013
Fix: standalone coroutine exception canceled
vol0n Aug 1, 2022
4e334f1
Fix: source folder view pane not working
vol0n Aug 1, 2022
91f3ace
fix coverage
vol0n Aug 1, 2022
d2b2b7e
Use noStateLoaded for state initialization
vol0n Aug 1, 2022
f539227
fixes
Aug 2, 2022
9457770
correct mark/unmark actions' names
Aug 2, 2022
530752b
Merge branch 'vol0n/clion_plugin' into fix_bugs_after_refactoring
Aug 2, 2022
6b3510f
Refactor UTBotRunWithCoverageLineMarkerInfo
Aug 2, 2022
8403ca0
Add button for local/wsl scenario, use spinners for int fields
vol0n Aug 2, 2022
19cc7b3
Bring all package names into line with naming requirements (#368)
vol0n Aug 4, 2022
12470a1
fix settings (#367)
vol0n Aug 4, 2022
4eafcad
use markDirtyAndRefresh (#371)
vol0n Aug 4, 2022
6439e7c
Don't change directory status on double click
vol0n Aug 4, 2022
421c7a2
Merge branch 'vol0n/clion_plugin' of https://github.com/UnitTestBot/U…
vol0n Aug 4, 2022
25f719e
Fix tests
vol0n Aug 4, 2022
78db419
fix tests
vol0n Aug 4, 2022
26f60d3
fix tests
vol0n Aug 4, 2022
8128558
fix tests
vol0n Aug 4, 2022
3d763f6
restore .vscode/settings.json
vol0n Aug 5, 2022
d6ec798
restore .vscode/settings.json
vol0n Aug 5, 2022
c0567f0
fix: with prompted result
vol0n Aug 5, 2022
e9d1b7f
remove 'Detect path' button
vol0n Aug 5, 2022
58e833c
Remove local or wsl checkbox in settings
vol0n Aug 5, 2022
0a96056
modify workflows to include clion artifact
vol0n Aug 6, 2022
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
12 changes: 12 additions & 0 deletions .github/workflows/build-utbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,18 @@ jobs:
./docker/action-scripts/build-vsix.sh
chmod +x docker/action-scripts/integration-tests.sh
./docker/action-scripts/integration-tests.sh
- name: Run CLion integration tests
run: |
chmod +x docker/action-scripts/runClionIntegrationTests.sh
./docker/action-scripts/runClionIntegrationTests.sh
- name: Upload logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-report
path: |
/github/home/logs
clion-plugin/build/reports/tests/**/*

build-utbot-and-generate-test:
needs: matrix-prep
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/publish-utbot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: Publish UTBot as an archive

on:
push:
tags:
- '[1-9][0-9][0-9][0-9].[1]?[0-9].[0-9]+'
branches:
- main
on: push

jobs:
matrix-prep:
Expand Down Expand Up @@ -65,6 +60,10 @@ jobs:
run: |
chmod +x docker/action-scripts/build-vsix.sh
./docker/action-scripts/build-vsix.sh
- name: build CLion plugin
run: |
chmod +x docker/action-scripts/build-clion-plugin.sh
./docker/action-scripts/build-clion-plugin.sh
- name: build UTBot
run: |
chmod +x docker/action-scripts/build-utbot.sh
Expand Down
17 changes: 17 additions & 0 deletions clion-plugin/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Dependabot configuration:
# https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Maintain dependencies for Gradle dependencies
- package-ecosystem: "gradle"
directory: "/"
target-branch: "next"
schedule:
interval: "daily"
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "next"
schedule:
interval: "daily"
174 changes: 174 additions & 0 deletions clion-plugin/.github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# GitHub Actions Workflow created for testing and preparing the plugin release in following steps:
# - validate Gradle Wrapper,
# - run test and verifyPlugin tasks,
# - run buildPlugin task and prepare artifact for the further tests,
# - run IntelliJ Plugin Verifier,
# - create a draft release.
#
# Workflow is triggered on push and pull_request events.
#
# Docs:
# - GitHub Actions: https://help.github.com/en/actions
# - IntelliJ Plugin Verifier GitHub Action: https://github.com/ChrisCarini/intellij-platform-plugin-verifier-action
#
## JBIJPPTPL

name: 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
pull_request:

jobs:

# Run Gradle Wrapper Validation Action to verify the wrapper's checksum
gradleValidation:
name: Gradle Wrapper
runs-on: ubuntu-latest
steps:

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

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

# Run verifyPlugin and test Gradle tasks
test:
name: Test
needs: gradleValidation
runs-on: ubuntu-latest
steps:

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

# Setup Java 11 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 11
cache: gradle

# Set environment variables
- name: Export Properties
id: properties
shell: bash
run: |
PROPERTIES="$(./gradlew properties --console=plain -q)"
IDE_VERSIONS="$(echo "$PROPERTIES" | grep "^pluginVerifierIdeVersions:" | base64)"

echo "::set-output name=ideVersions::$IDE_VERSIONS"
echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier"

# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
uses: actions/cache@v2.1.6
with:
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
key: ${{ runner.os }}-plugin-verifier-${{ steps.properties.outputs.ideVersions }}

# Run Qodana inspections
- name: Qodana - Code Inspection
uses: JetBrains/qodana-action@v3.2.1

# Run tests
- name: Run Tests
run: ./gradlew test

# Run verifyPlugin Gradle task
- name: Verify Plugin
run: ./gradlew verifyPlugin

# Run IntelliJ Plugin Verifier action using GitHub Action
- name: Run Plugin Verifier
run: ./gradlew runPluginVerifier -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }}

# Build plugin with buildPlugin Gradle task and provide the artifact for the next workflow jobs
# Requires test job to be passed
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@v2.3.4

# Setup Java 11 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 11
cache: gradle

# Set environment variables
- name: Export Properties
id: properties
shell: bash
run: |
PROPERTIES="$(./gradlew properties --console=plain -q)"
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')"
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"

echo "::set-output name=version::$VERSION"
echo "::set-output name=name::$NAME"
echo "::set-output name=changelog::$CHANGELOG"

# Build artifact using buildPlugin Gradle task
- name: Build Plugin
run: ./gradlew buildPlugin

# Store built plugin as an artifact for downloading
- name: Upload artifacts
uses: actions/upload-artifact@v2.2.4
with:
name: "${{ steps.properties.outputs.name }} - ${{ steps.properties.outputs.version }}"
path: ./build/distributions/*

# Prepare a draft release for GitHub Releases page for the manual verification
# If accepted and published, release workflow would be triggered
releaseDraft:
name: Release Draft
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
steps:

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

# Remove old release drafts by using the curl request for the available releases with draft flag
- name: Remove Old Release Drafts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/{owner}/{repo}/releases \
--jq '.[] | select(.draft == true) | .id' \
| xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{}

# Create new release draft - which is not publicly visible and requires manual acceptance
- name: Create Release Draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v${{ needs.build.outputs.version }} \
--draft \
--title "v${{ needs.build.outputs.version }}" \
--notes "${{ needs.build.outputs.changelog }}"
69 changes: 69 additions & 0 deletions clion-plugin/.github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# GitHub Actions Workflow created for handling the release process based on the draft release prepared
# with the Build workflow. Running the publishPlugin task requires the PUBLISH_TOKEN secret provided.

name: Release
on:
release:
types: [prereleased, released]

jobs:

# Prepare and publish the plugin to the Marketplace repository
release:
name: Publish Plugin
runs-on: ubuntu-latest
steps:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2.3.4
with:
ref: ${{ github.event.release.tag_name }}

# Setup Java 11 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 11
cache: gradle

# Update Unreleased section with the current release note
- name: Patch Changelog
run: |
./gradlew patchChangelog --release-note="`cat << EOM
${{ github.event.release.body }}
EOM`"

# Publish the plugin to the Marketplace
- name: Publish Plugin
env:
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
run: ./gradlew publishPlugin

# Upload artifact as a release asset
- name: Upload Release Asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} ./build/distributions/*

# Create pull request
- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${{ github.event.release.tag_name }}"
BRANCH="changelog-update-$VERSION"

git config user.email "action@github.com"
git config user.name "GitHub Action"

git checkout -b $BRANCH
git commit -am "Changelog update - $VERSION"
git push --set-upstream origin $BRANCH

gh pr create \
--title "Changelog update - \`$VERSION\`" \
--body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \
--base main \
--head $BRANCH
60 changes: 60 additions & 0 deletions clion-plugin/.github/workflows/run-ui-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# GitHub Actions Workflow created for launching UI tests on Linux, Windows, and Mac in the following steps:
# - prepare and launch Idea with your plugin and robot-server plugin, which is need to interact with UI
# - wait for the Idea started
# - run UI tests with separate Gradle task
#
# Please check https://github.com/JetBrains/intellij-ui-test-robot for information about UI tests with IntelliJ IDEA.
#
# Workflow is triggered manually.

name: Run UI Tests
on:
workflow_dispatch

jobs:

testUI:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
runIde: |
export DISPLAY=:99.0
Xvfb -ac :99 -screen 0 1920x1080x16 &
gradle runIdeForUiTests &
- os: windows-latest
runIde: start gradlew.bat runIdeForUiTests
- os: macos-latest
runIde: ./gradlew runIdeForUiTests &

steps:

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

# Setup Java 11 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 11
cache: gradle

# Run IDEA prepared for UI testing
- name: Run IDE
run: ${{ matrix.runIde }}

# Wait for IDEA to be started
- name: Health Check
uses: jtalk/url-health-check-action@v1.5
with:
url: http://127.0.0.1:8082
max-attempts: 15
retry-delay: 30s

# Run tests
- name: Tests
run: ./gradlew test
Loading