mirror of
https://github.com/JetBrains/intellij-platform-plugin-template.git
synced 2024-10-27 20:44:05 +00:00
GitHub Actions - Tests
This commit is contained in:
parent
c9a81c844c
commit
85d57ca0ff
75
.github/workflows/tests.yml
vendored
Normal file
75
.github/workflows/tests.yml
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
name: Tests
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Fetch Sources
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Setup Cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Verify Plugin
|
||||
run: ./gradlew verifyPlugin --no-daemon
|
||||
- name: Run Tests
|
||||
run: ./gradlew test --no-daemon
|
||||
build:
|
||||
name: Build
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Fetch Sources
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Setup Cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Export Properties
|
||||
run: |
|
||||
echo "::set-env name=VERSION::$(./gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')"
|
||||
echo "::set-env name=NAME::$(./gradlew properties --no-daemon --console=plain -q | grep "^name:" | awk '{printf $2}')"
|
||||
- name: Build Plugin
|
||||
run: ./gradlew buildPlugin --no-daemon
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: plugin-artifact
|
||||
path: ./build/distributions/${{ env.NAME }}-${{ env.VERSION }}.zip
|
||||
verify:
|
||||
name: Verify
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: plugin-artifact
|
||||
- name: Verify Plugin
|
||||
id: verify
|
||||
uses: ChrisCarini/intellij-platform-plugin-verifier-action@v0.0.2
|
||||
with:
|
||||
plugin-location: plugin-artifact.zip
|
||||
ide-versions: |
|
||||
ideaIC:2020.1
|
||||
# ideaIC:LATEST-EAP-SNAPSHOT
|
||||
- name: Print Logs
|
||||
run: |
|
||||
echo "The verifier log file [${{steps.verify.outputs.verification-output-log-filename}}] contents : " ;
|
||||
cat ${{steps.verify.outputs.verification-output-log-filename}}
|
Loading…
Reference in New Issue
Block a user