-
Notifications
You must be signed in to change notification settings - Fork 31
71 lines (63 loc) · 2.48 KB
/
ci.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
name: CI
on:
pull_request:
branches:
- master
- prod
env:
GO111MODULE: on
TEST_TAGS: integration
DATABASE_MIGRATIONS_URL: file://$(pwd)/migrations
GEMINI_SUBMIT_TYPE: hmac
BAT_SETTLEMENT_ADDRESS: ${{secrets.BAT_SETTLEMENT_ADDRESS}}
DONOR_WALLET_CARD_ID: ${{secrets.DONOR_WALLET_CARD_ID}}
DONOR_WALLET_PRIVATE_KEY: ${{secrets.DONOR_WALLET_PRIVATE_KEY}}
DONOR_WALLET_PUBLIC_KEY: ${{secrets.DONOR_WALLET_PUBLIC_KEY}}
ENCRYPTION_KEY: ${{secrets.ENCRYPTION_KEY}}
GEMINI_API_KEY: ${{secrets.GEMINI_API_KEY}}
GEMINI_API_SECRET: ${{secrets.GEMINI_API_KEY}}
GEMINI_BROWSER_CLIENT_ID: ${{secrets.GEMINI_BROWSER_CLIENT_ID}}
GEMINI_CLIENT_ID: ${{secrets.GEMINI_CLIENT_ID}}
GEMINI_CLIENT_SECRET: ${{secrets.GEMINI_CLIENT_SECRET}}
GEMINI_SERVER: ${{secrets.GEMINI_SERVER}}
GEMINI_TEST_DESTINATION_ID: ${{secrets.GEMINI_TEST_DESTINATION_ID}}
GRANT_WALLET_CARD_ID: ${{secrets.GRANT_WALLET_CARD_ID}}
GRANT_WALLET_PRIVATE_KEY: ${{secrets.GRANT_WALLET_PRIVATE_KEY}}
GRANT_WALLET_PUBLIC_KEY: ${{secrets.GRANT_WALLET_PUBLIC_KEY}}
UPHOLD_ACCESS_TOKEN: ${{secrets.UPHOLD_ACCESS_TOKEN}}
RATIOS_TOKEN: ${{secrets.RATIOS_TOKEN}}
UPHOLD_SETTLEMENT_ADDRESS: ${{secrets.UPHOLD_SETTLEMENT_ADDRESS}}
BITFLYER_SOURCE_FROM: tipping
BITFLYER_CLIENT_ID: ${{secrets.BITFLYER_CLIENT_ID}}
BITFLYER_CLIENT_SECRET: ${{secrets.BITFLYER_CLIENT_SECRET}}
BITFLYER_EXTRA_CLIENT_SECRET: ${{secrets.BITFLYER_EXTRA_CLIENT_SECRET}}
BITFLYER_SERVER: ${{secrets.BITFLYER_SERVER}}
BITFLYER_TOKEN: ${{secrets.BITFLYER_TOKEN}}
REDIS_ADDR: redis://grant-redis/
jobs:
CI:
runs-on: ubuntu-latest
strategy:
matrix:
goversion:
- 1.18
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Set up Go 1.x
uses: actions/setup-go@37335c7bb261b353407cff977110895fa0b4f7d8
with:
go-version: ${{matrix.goversion}}
- name: Docker Compose Install
uses: KengoTODA/actions-setup-docker-compose@92cbaf8ac8c113c35e1cedd1182f217043fbdd00
with:
version: '1.25.4'
- run: docker-compose pull
- name: Vault
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d vault;
sleep 3;
- name: Test
run: |
export VAULT_TOKEN=$(docker logs grant-vault 2>&1 | grep "Root Token" | tail -1 | cut -d ' ' -f 3 );
docker-compose -f docker-compose.yml -f docker-compose.dev.yml run --rm dev make;