-
Notifications
You must be signed in to change notification settings - Fork 73
35 lines (32 loc) · 1.08 KB
/
pr.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
name: PR build
on:
pull_request:
branches: [ master ]
jobs:
test-codepropertygraph:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Clone submodules
run: git submodule update --init --recursive
- name: apt-get update
run: sudo apt-get update
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 19
- name: Compile and run tests
run: sbt +test
- name: Check formatting
run: sbt scalafmtCheck Test/scalafmtCheck
- run: echo "Previous step failed because code is not formatted. Run 'sbt scalafmt'"
if: ${{ failure() }}
- name: Check if there are changes
uses: NathanielHill/fail-if-changes@master
- name: Check domain classes
run: sbt generateDomainClassesCheck
- run: echo "Previous step failed because latest domain classes are not committed. Run 'sbt generateDomainClasses' (should be triggered automatically by `sbt compile`, so maybe you just forgot to commit?)"
if: ${{ failure() }}