Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code completion plugin: add plugin tests workflow #27212

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
5676be1
Code completion plugin: add plugin tests workflow
sultanalieva-s Jun 21, 2023
fded68f
Testing changing directory in code_completion_plugin_tests.yml
pabloem Jun 22, 2023
162f115
Making gradlew executable
pabloem Jun 22, 2023
68fae3b
Fix gradlew intellij plugin import
pabloem Jun 22, 2023
ee396be
change gradlew premissions
sultanalieva-s Jun 22, 2023
b7478cc
Merge branch 'code-completion-plugin-ci-tests-workflow' of github.com…
sultanalieva-s Jun 22, 2023
9baa351
code-completion-plugin: fixing GA tests workflow
sultanalieva-s Jun 22, 2023
4c6376a
Revert "change gradlew premissions"
sultanalieva-s Jun 22, 2023
1516c5f
Revert "code-completion-plugin: fixing GA tests workflow"
sultanalieva-s Jun 22, 2023
cc3d7d3
fix code_completion_plugin_tests.yml
sultanalieva-s Jun 22, 2023
566ec87
Making gradlew executable
pabloem Jun 22, 2023
b8199cf
code-completion-plugin-fix intellij plugin version in build.gradle.kts
sultanalieva-s Jun 22, 2023
51c113c
Merge branch 'code-completion-plugin-ci-tests-workflow' of github.com…
sultanalieva-s Jun 22, 2023
bcb11a3
code-completion-plugin: change java version (17 -> 11) in code_comple…
sultanalieva-s Jun 22, 2023
24ebf34
test code completion plugin CI
sultanalieva-s Jun 22, 2023
89f39f0
Add env vars to code_completion_plugin_test.yml
sultanalieva-s Jun 23, 2023
46411d7
code-completion-plugin: test ci
sultanalieva-s Jun 24, 2023
c2d645b
code-completion-plugin: clone intellij-community to CI runner
sultanalieva-s Jun 24, 2023
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
112 changes: 112 additions & 0 deletions .github/workflows/code_completion_plugin_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.


# The workflow is triggered on the following events:
# - pull requests that contain changes in plugins/beam-code-completion-plugin/ directory
# - pushes to any branch except master. the push must contain changes in plugins/beam-code-completion-plugin/ directory

# To learn more about GitHub Actions in Apache Beam check the CI.md

name: Code Completion Plugin Tests
on:
push:
branches-ignore:
- 'master'
paths:
- 'plugins/beam-code-completion-plugin/**'
- '.github/workflows/code_completion_plugin_tests.yml'
pull_request:
paths:
- 'plugins/beam-code-completion-plugin/**'
- '.github/workflows/code_completion_plugin_tests.yml'
env:
INTELLIJ_IDEA_SOURCES: /home/runner/work/beam/beam/intellij
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
test:
name: Build and run model-level tests
runs-on: ubuntu-latest
steps:
# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc

# Check out beam repository
- name: Fetch beam Sources
uses: actions/checkout@v3
with:
path: main

# Check out intellij community repository for tests
- name: Fetch intellij-community Sources
uses: actions/checkout@v3
with:
repository: JetBrains/intellij-community
path: intellij

# Validate wrapper
- name: Gradle Wrapper Validation
uses: gradle/[email protected]

# Setup Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'

# Set environment variables
- name: Export Properties
id: properties
shell: bash
run: |
pwd
cd main/plugins/beam-code-completion-plugin/
pwd
PROPERTIES="$(./gradlew properties --console=plain -q)"
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
NAME="$(echo "$PROPERTIES" | grep "^name:" | cut -f2- -d ' ')"

echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "name=$NAME" >> $GITHUB_OUTPUT
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT

echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

# Run tests
- name: Run Tests
run: |
pwd
cd main/plugins/beam-code-completion-plugin/
pwd
./gradlew test --info

# 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
1 change: 1 addition & 0 deletions plugins/beam-code-completion-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ tasks.test {
systemProperty("idea.home.path", System.getenv("INTELLIJ_IDEA_SOURCES"))
useJUnit()
}

Empty file modified plugins/beam-code-completion-plugin/gradlew
100644 → 100755
Empty file.