-
Notifications
You must be signed in to change notification settings - Fork 259
54 lines (52 loc) · 1.74 KB
/
main.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
name: PR Check - Integration Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Setup Go environment
uses: actions/setup-go@v2
with:
go-version: '1.18.x'
- name: Cache M2 Repo
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache Go Modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Extract Maven project version
run: echo ::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
id: extract-project-version
- name: Print Maven project version
run: echo ${{ steps.extract-project-version.outputs.version }}
- name: Generate proto API
run: sudo sh api/protogen.sh
- name: Check for uncommitted changes
run: |
if [[ `git status --porcelain` ]]; then
echo "There are uncommitted changes"
git status
exit 1
else
echo "No changes"
fi
- name: Build with Maven
run: |
export GOFLAGS=-mod=mod
mvn clean install -Dskip.code.coverage=false -PRelease -s .maven/settings.xml
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3