-
Notifications
You must be signed in to change notification settings - Fork 15
46 lines (40 loc) · 1.3 KB
/
java-contracts-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
name: Test Java contracts
on:
pull_request:
branches:
- '**'
paths:
- 'contracts/javascore/**'
push:
branches:
- main
paths:
- 'contracts/javascore/**'
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Run unit tests
run: cd contracts/javascore && ./gradlew clean build && ./gradlew optimizedJar
integration-test:
needs: unit-test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.29.0/docker-compose-linux-x86_64" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Start local Blockchain
run: docker logout public.ecr.aws && cd contracts/javascore/gochain-btp && make run
- name: Check if all contracts are deployable
run: cd contracts/javascore && ./gradlew clean build && ./gradlew optimizedJar && ./gradlew deployToLocal -PdeploymentENV=local
- name: Run integration tests
run: cd contracts/javascore && ./gradlew integrationTest