-
Notifications
You must be signed in to change notification settings - Fork 67
98 lines (85 loc) · 2.91 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Continues Integration
on: [push]
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Verify plugin id in plugin.xml has not changed
run: ./verify-plugin-id.sh
- uses: actions/setup-java@v1
with:
java-version: 11
- uses: actions/cache@v2
name: Cache Gradle packages
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build & Test
run: ./gradlew build --scan
- if: always()
name: Publish Test Report
uses: scacap/action-surefire-report@v1
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v2
with:
name: Reports
path: build/reports
compatibility-stable:
name: Ensure plugin compatibility against IC releases 2019.3 and current latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Download latest stable
run: |
sudo curl -L "https://download.jetbrains.com/product?code=IC&latest&distribution=linux" --output latest.tar.gz
mkdir latest && tar -xvf latest.tar.gz -C latest --strip-components 1
ls -al latest
- name: Build the plugins
run: ./gradlew buildPlugin
- name: Validate the public plugin
run: ./gradlew :Tabnine:runPluginVerifier -PlocalPaths="$(pwd)/latest"
- name: Validate the self-hosted plugin
run: ./gradlew :TabnineSelfHosted:runPluginVerifier -PlocalPaths="$(pwd)/latest"
format:
name: Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Check Java Formatting
run: ./gradlew verGJF --warning-mode all
- name: Check Kotlin Formatting
run: ./gradlew ktlintCheck
security:
name: Vulnerabilities Scanning
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/gradle-jdk11@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --severity-threshold=high --all-projects