-
Notifications
You must be signed in to change notification settings - Fork 4
76 lines (66 loc) · 2.11 KB
/
build-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
68
69
70
71
72
73
74
75
76
name: Validate and test
on:
pull_request:
push:
branches:
- main
tags-ignore: [ v.* ]
jobs:
check-code-style:
name: Checks
runs-on: ubuntu-18.04
if: github.repository == 'akka/akka-projection-testing'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves
fetch-depth: 0
- name: Checkout GitHub merge
if: github.event.pull_request
run: |-
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
git checkout scratch
- name: Set up JDK 11
uses: olafurpg/setup-scala@v10
with:
java-version: adopt@1.11.0-9
- name: Cache Coursier cache
uses: coursier/cache-action@v5
- name: Code style check
run: |-
cp .jvmopts-ci .jvmopts
sbt verifyCodeStyle
test:
name: Run tests
runs-on: ubuntu-18.04
if: github.repository == 'akka/akka-projection-testing'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout GitHub merge
if: github.event.pull_request
run: |-
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
git checkout scratch
- name: Set up JDK 11
uses: olafurpg/setup-scala@v10
with:
java-version: adopt@1.11.0-9
- name: Cache Coursier cache
uses: coursier/cache-action@v5
- name: docker-compose
run: |-
docker-compose -f docker/docker-compose-postgres.yml up -d
# TODO: could we poll the port instead of sleep?
sleep 10
docker exec -i docker_postgres-db_1 psql -U postgres -t < ddl-scripts/create_tables_postgres.sql
- name: docker-compose
run: docker-compose -f docker/docker-compose-cassandra.yml up -d
- name: test
run: sbt -jvm-opts .jvmopts-ci test
- name: after failure
if: ${{ failure() }}
run: docker-compose logs