-
Notifications
You must be signed in to change notification settings - Fork 20
51 lines (43 loc) · 1.16 KB
/
build-and-run-tests.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
name: Build and Run Tests [gradle]
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
strategy:
matrix:
java: [ '11' ]
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: "true"
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: "zulu"
java-version: ${{ matrix.java }}
cache: "gradle"
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Install CPython optional dependencies
run: |
sudo apt-get update
sudo apt-get install -yq\
libssl-dev \
libffi-dev
- name: Build and run tests
run: |
./gradlew build --no-daemon -PcpythonActivated=true
- name: Run Detekt
run: |
./gradlew detektMain detektTest --no-daemon
- name: Upload SARIF to GitHub
uses: github/codeql-action/upload-sarif@v3
if: success() || failure()
with:
sarif_file: build/reports/detekt/detekt.sarif