-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (57 loc) · 1.66 KB
/
build-and-test.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
name: Build and test
on:
push:
branches: [main]
# paths:
# - "lib/**"
# - "services/**"
# - "buildSrc/**"
# - "cli/**"
pull_request:
branches: [main]
# paths:
# - "lib/**"
# - "services/**"
# - "buildSrc/**"
# - "cli/**"
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "stable"
cache-dependency-path: |
cli/lega-commander/go.sum
services/mq-interceptor/go.sum
services/cega-mock/go.sum
- name: Cache gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/cache
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with Gradle
run: ./gradlew assemble
- name: Run tests
run: ./gradlew :lib:crypt4gh:test :lib:clearinghouse:test :lib:tsd-file-api-client:test :services:tsd-api-mock:test :services:mq-interceptor:test :services:localega-tsd-proxy:test :services:cega-mock:test :cli:lega-commander:test
- name: Run e2e tests
run: |
./gradlew clean
./gradlew start-docker-containers
sleep 20
./gradlew :e2eTests:test --stacktrace
- name: Containers status
if: failure()
run: |
docker ps