forked from flow-hydraulics/flow-pds
-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (65 loc) · 2.11 KB
/
tests.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: Tests
on:
pull_request:
jobs:
emulator:
env:
FLOW_CLI_VERSION: v0.35.0
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Cache Flow CLI
id: cache-flow-cli
uses: actions/cache@v2
with:
path: ~/.local/bin/flow
key: ${{ runner.os }}-flow-cli-${{ env.FLOW_CLI_VERSION }}
- name: Install Flow CLI
if: steps.cache-flow-cli.outputs.cache-hit != 'true'
run: sh -c "$(curl -fsSL https://storage.googleapis.com/flow-cli/install.sh)" 0 $FLOW_CLI_VERSION
- name: Cache Go modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Copy .env
uses: canastro/copy-file-action@master
with:
source: "env.example"
target: ".env"
- name: Start containers
run: docker-compose up -d db
- name: Run tests
env:
NETWORK: emulator
RPC_ADDRESS: localhost:3569
NON_FUNGIBLE_TOKEN_ADDRESS: f8d6e0586b0a20c7
FUNGIBLE_TOKEN_ADDRESS: f8d6e0586b0a20c7
METADATA_VIEWS_ADDRESS: f8d6e0586b0a20c7
EXAMPLE_NFT_ADDRESS: 01cf0e2f2f715450
PACKNFT_ADDRESS: 01cf0e2f2f715450
PDS_ADDRESS: f3fcd2c1a78f5eee
FLOW_PDS_ADMIN_ADDRESS: f3fcd2c1a78f5eee
FLOW_PDS_ADMIN_PRIVATE_KEY: 9c687961e7a1abe1e445830e7ec118ffd1e2a0449cf705f5476b3f100e94dc29
FLOW_PDS_ACCESS_API_HOST: localhost:3569
TESTNET_OWNER: ${{ secrets.TESTNET_OWNER}}
TESTNET_ISSUER: ${{ secrets.TESTNET_ISSUER}}
TESTNET_PDS: ${{ secrets.TESTNET_PDS}}
NUM_KEYS: 10
run: ./tests-with-emulator.sh
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3
with:
version: v1.42
args: --timeout=3m --tests=true