Skip to content

Commit c2f1378

Browse files
committed
add content
1 parent 4978445 commit c2f1378

File tree

152 files changed

+7202
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+7202
-1
lines changed

.github/workflows/build-utbot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,17 @@ jobs:
9494
./docker/action-scripts/build-vsix.sh
9595
chmod +x docker/action-scripts/integration-tests.sh
9696
./docker/action-scripts/integration-tests.sh
97+
- name: Setup Java
98+
uses: actions/setup-java@v2
99+
with:
100+
distribution: zulu
101+
java-version: 11
102+
cache: gradle
103+
- name: Run CLion Plugin Tests
104+
run: |
105+
./server/build/utbot server > /dev/null 2>&1
106+
cd clion-plugin
107+
./gradlew test --info
97108
98109
build-utbot-and-generate-test:
99110
needs: matrix-prep

clion-plugin/.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Dependabot configuration:
2+
# https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
# Maintain dependencies for Gradle dependencies
7+
- package-ecosystem: "gradle"
8+
directory: "/"
9+
target-branch: "next"
10+
schedule:
11+
interval: "daily"
12+
# Maintain dependencies for GitHub Actions
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
target-branch: "next"
16+
schedule:
17+
interval: "daily"
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
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 buildPlugin task and prepare artifact for the further tests,
5+
# - run IntelliJ Plugin Verifier,
6+
# - create a draft release.
7+
#
8+
# Workflow is triggered on push and pull_request events.
9+
#
10+
# Docs:
11+
# - GitHub Actions: https://help.github.com/en/actions
12+
# - IntelliJ Plugin Verifier GitHub Action: https://github.com/ChrisCarini/intellij-platform-plugin-verifier-action
13+
#
14+
## JBIJPPTPL
15+
16+
name: Build
17+
on:
18+
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g. for dependabot pull requests)
19+
push:
20+
branches: [main]
21+
# Trigger the workflow on any pull request
22+
pull_request:
23+
24+
jobs:
25+
26+
# Run Gradle Wrapper Validation Action to verify the wrapper's checksum
27+
gradleValidation:
28+
name: Gradle Wrapper
29+
runs-on: ubuntu-latest
30+
steps:
31+
32+
# Check out current repository
33+
- name: Fetch Sources
34+
uses: actions/[email protected]
35+
36+
# Validate wrapper
37+
- name: Gradle Wrapper Validation
38+
uses: gradle/[email protected]
39+
40+
# Run verifyPlugin and test Gradle tasks
41+
test:
42+
name: Test
43+
needs: gradleValidation
44+
runs-on: ubuntu-latest
45+
steps:
46+
47+
# Check out current repository
48+
- name: Fetch Sources
49+
uses: actions/[email protected]
50+
51+
# Setup Java 11 environment for the next steps
52+
- name: Setup Java
53+
uses: actions/setup-java@v2
54+
with:
55+
distribution: zulu
56+
java-version: 11
57+
cache: gradle
58+
59+
# Set environment variables
60+
- name: Export Properties
61+
id: properties
62+
shell: bash
63+
run: |
64+
PROPERTIES="$(./gradlew properties --console=plain -q)"
65+
IDE_VERSIONS="$(echo "$PROPERTIES" | grep "^pluginVerifierIdeVersions:" | base64)"
66+
67+
echo "::set-output name=ideVersions::$IDE_VERSIONS"
68+
echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier"
69+
70+
# Cache Plugin Verifier IDEs
71+
- name: Setup Plugin Verifier IDEs Cache
72+
uses: actions/[email protected]
73+
with:
74+
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
75+
key: ${{ runner.os }}-plugin-verifier-${{ steps.properties.outputs.ideVersions }}
76+
77+
# Run Qodana inspections
78+
- name: Qodana - Code Inspection
79+
uses: JetBrains/[email protected]
80+
81+
# Run tests
82+
- name: Run Tests
83+
run: ./gradlew test
84+
85+
# Run verifyPlugin Gradle task
86+
- name: Verify Plugin
87+
run: ./gradlew verifyPlugin
88+
89+
# Run IntelliJ Plugin Verifier action using GitHub Action
90+
- name: Run Plugin Verifier
91+
run: ./gradlew runPluginVerifier -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }}
92+
93+
# Build plugin with buildPlugin Gradle task and provide the artifact for the next workflow jobs
94+
# Requires test job to be passed
95+
build:
96+
name: Build
97+
needs: test
98+
runs-on: ubuntu-latest
99+
outputs:
100+
version: ${{ steps.properties.outputs.version }}
101+
changelog: ${{ steps.properties.outputs.changelog }}
102+
steps:
103+
104+
# Check out current repository
105+
- name: Fetch Sources
106+
uses: actions/[email protected]
107+
108+
# Setup Java 11 environment for the next steps
109+
- name: Setup Java
110+
uses: actions/setup-java@v2
111+
with:
112+
distribution: zulu
113+
java-version: 11
114+
cache: gradle
115+
116+
# Set environment variables
117+
- name: Export Properties
118+
id: properties
119+
shell: bash
120+
run: |
121+
PROPERTIES="$(./gradlew properties --console=plain -q)"
122+
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
123+
NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')"
124+
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"
125+
CHANGELOG="${CHANGELOG//'%'/'%25'}"
126+
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
127+
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
128+
129+
echo "::set-output name=version::$VERSION"
130+
echo "::set-output name=name::$NAME"
131+
echo "::set-output name=changelog::$CHANGELOG"
132+
133+
# Build artifact using buildPlugin Gradle task
134+
- name: Build Plugin
135+
run: ./gradlew buildPlugin
136+
137+
# Store built plugin as an artifact for downloading
138+
- name: Upload artifacts
139+
uses: actions/[email protected]
140+
with:
141+
name: "${{ steps.properties.outputs.name }} - ${{ steps.properties.outputs.version }}"
142+
path: ./build/distributions/*
143+
144+
# Prepare a draft release for GitHub Releases page for the manual verification
145+
# If accepted and published, release workflow would be triggered
146+
releaseDraft:
147+
name: Release Draft
148+
if: github.event_name != 'pull_request'
149+
needs: build
150+
runs-on: ubuntu-latest
151+
steps:
152+
153+
# Check out current repository
154+
- name: Fetch Sources
155+
uses: actions/[email protected]
156+
157+
# Remove old release drafts by using the curl request for the available releases with draft flag
158+
- name: Remove Old Release Drafts
159+
env:
160+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
161+
run: |
162+
gh api repos/{owner}/{repo}/releases \
163+
--jq '.[] | select(.draft == true) | .id' \
164+
| xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{}
165+
166+
# Create new release draft - which is not publicly visible and requires manual acceptance
167+
- name: Create Release Draft
168+
env:
169+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
170+
run: |
171+
gh release create v${{ needs.build.outputs.version }} \
172+
--draft \
173+
--title "v${{ needs.build.outputs.version }}" \
174+
--notes "${{ needs.build.outputs.changelog }}"
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# GitHub Actions Workflow created for handling the release process based on the draft release prepared
2+
# with the Build workflow. Running the publishPlugin task requires the PUBLISH_TOKEN secret provided.
3+
4+
name: Release
5+
on:
6+
release:
7+
types: [prereleased, released]
8+
9+
jobs:
10+
11+
# Prepare and publish the plugin to the Marketplace repository
12+
release:
13+
name: Publish Plugin
14+
runs-on: ubuntu-latest
15+
steps:
16+
17+
# Check out current repository
18+
- name: Fetch Sources
19+
uses: actions/[email protected]
20+
with:
21+
ref: ${{ github.event.release.tag_name }}
22+
23+
# Setup Java 11 environment for the next steps
24+
- name: Setup Java
25+
uses: actions/setup-java@v2
26+
with:
27+
distribution: zulu
28+
java-version: 11
29+
cache: gradle
30+
31+
# Update Unreleased section with the current release note
32+
- name: Patch Changelog
33+
run: |
34+
./gradlew patchChangelog --release-note="`cat << EOM
35+
${{ github.event.release.body }}
36+
EOM`"
37+
38+
# Publish the plugin to the Marketplace
39+
- name: Publish Plugin
40+
env:
41+
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
42+
run: ./gradlew publishPlugin
43+
44+
# Upload artifact as a release asset
45+
- name: Upload Release Asset
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
run: gh release upload ${{ github.event.release.tag_name }} ./build/distributions/*
49+
50+
# Create pull request
51+
- name: Create Pull Request
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
run: |
55+
VERSION="${{ github.event.release.tag_name }}"
56+
BRANCH="changelog-update-$VERSION"
57+
58+
git config user.email "[email protected]"
59+
git config user.name "GitHub Action"
60+
61+
git checkout -b $BRANCH
62+
git commit -am "Changelog update - $VERSION"
63+
git push --set-upstream origin $BRANCH
64+
65+
gh pr create \
66+
--title "Changelog update - \`$VERSION\`" \
67+
--body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \
68+
--base main \
69+
--head $BRANCH
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# GitHub Actions Workflow created for launching UI tests on Linux, Windows, and Mac in the following steps:
2+
# - prepare and launch Idea with your plugin and robot-server plugin, which is need to interact with UI
3+
# - wait for the Idea started
4+
# - run UI tests with separate Gradle task
5+
#
6+
# Please check https://github.com/JetBrains/intellij-ui-test-robot for information about UI tests with IntelliJ IDEA.
7+
#
8+
# Workflow is triggered manually.
9+
10+
name: Run UI Tests
11+
on:
12+
workflow_dispatch
13+
14+
jobs:
15+
16+
testUI:
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- os: ubuntu-latest
23+
runIde: |
24+
export DISPLAY=:99.0
25+
Xvfb -ac :99 -screen 0 1920x1080x16 &
26+
gradle runIdeForUiTests &
27+
- os: windows-latest
28+
runIde: start gradlew.bat runIdeForUiTests
29+
- os: macos-latest
30+
runIde: ./gradlew runIdeForUiTests &
31+
32+
steps:
33+
34+
# Check out current repository
35+
- name: Fetch Sources
36+
uses: actions/[email protected]
37+
38+
# Setup Java 11 environment for the next steps
39+
- name: Setup Java
40+
uses: actions/setup-java@v2
41+
with:
42+
distribution: zulu
43+
java-version: 11
44+
cache: gradle
45+
46+
# Run IDEA prepared for UI testing
47+
- name: Run IDE
48+
run: ${{ matrix.runIde }}
49+
50+
# Wait for IDEA to be started
51+
- name: Health Check
52+
uses: jtalk/[email protected]
53+
with:
54+
url: http://127.0.0.1:8082
55+
max-attempts: 15
56+
retry-delay: 30s
57+
58+
# Run tests
59+
- name: Tests
60+
run: ./gradlew test

clion-plugin/.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Compiled class file
2+
*.class
3+
4+
# Log file
5+
*.log
6+
7+
# BlueJ files
8+
*.ctxt
9+
10+
# Mobile Tools for Java (J2ME)
11+
.mtj.tmp/
12+
13+
# Package Files #
14+
*.war
15+
*.nar
16+
*.ear
17+
*.zip
18+
*.tar.gz
19+
*.rar
20+
21+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
22+
hs_err_pid*
23+
24+
# gradle directory
25+
.gradle
26+
27+
# idea settings
28+
.idea
29+
30+
# quadana settings
31+
.qodana
32+
33+
# build files
34+
build
35+
36+
#macos files
37+
.DS_Store

0 commit comments

Comments
 (0)