aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <marussy@mit.bme.hu>2021-09-24 18:21:45 +0200
committerLibravatar Kristóf Marussy <marussy@mit.bme.hu>2021-09-24 18:21:45 +0200
commite83016134a713318c2b25ceb47bd79ec653e5313 (patch)
tree1510f6a0c55597b37a58bb8b27e61d5ede2d36d6 /.github/workflows
parentdocs: add EPL-2.0 license (diff)
downloadrefinery-e83016134a713318c2b25ceb47bd79ec653e5313.tar.gz
refinery-e83016134a713318c2b25ceb47bd79ec653e5313.tar.zst
refinery-e83016134a713318c2b25ceb47bd79ec653e5313.zip
ci: add GH actions build and SonarScanner
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build.yml48
1 files changed, 48 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 00000000..d674bae0
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,48 @@
1name: Build
2on:
3 push:
4 branches:
5 - main
6 pull_request:
7 types: [opened, synchronize, reopened]
8jobs:
9 build:
10 name: Build
11 runs-on: ubuntu-latest
12 steps:
13 - name: Checkout code
14 uses: actions/checkout@v2
15 with:
16 fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of SonarCloud analysis
17 - name: Set up JDK 11
18 uses: actions/setup-java@v1
19 with:
20 java-version: 11
21 - name: Cache Gradle packages
22 uses: actions/cache@v2
23 with:
24 path: |
25 ~/.gradle/caches
26 **/.gradle/npm
27 **/.gradle/nodejs
28 key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
29 restore-keys: ${{ runner.os }}-gradle
30 - name: Cache Sonar packages
31 uses: actions/cache@v2
32 with:
33 path: ~/.sonar/cache
34 key: ${{ runner.os }}-sonar
35 restore-keys: ${{ runner.os }}-sonar
36 - name: Cache npm packages
37 uses: actions/cache@v2
38 with:
39 path: **/node_modules
40 key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
41 restore-keys: ${{ runner.os }}-npm
42 - name: Gradle build
43 run: ./gradlew build --info
44 - name: Sonar analyze
45 env:
46 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
47 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
48 run: ./gradlew sonarqube --info