-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (82 loc) · 2.2 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Tests
on:
pull_request:
push:
branches:
- main
- release/**
jobs:
test-unit-relayer:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
cw-relayer/**/**.go
cw-relayer/go.mod
cw-relayer/go.sum
- uses: actions/setup-go@v4
if: env.GIT_DIFF
with:
go-version: 1.19
cache: true
cache-dependency-path: cw-relayer/go.sum
- name: Test Relayer
if: env.GIT_DIFF
run: |
make test-unit-relayer
test-unit-contract:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
cosmwasm/contracts/price-feed/src/*
cosmwasm/contracts/price-feed/Cargo.toml
cosmwasm/Cargo.toml
cosmwasm/Cargo.lock
- uses: actions-rs/toolchain@v1
if: env.GIT_DIFF
with:
toolchain: stable
- name: Test Contracts
if: env.GIT_DIFF
run: |
make test-unit-contract
test-e2e:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
cw-relayer/**/**.go
cw-relayer/go.mod
cw-relayer/go.sum
cosmwasm/contracts/price-feed/src/*
cosmwasm/contracts/price-feed/Cargo.toml
cosmwasm/Cargo.toml
cosmwasm/Cargo.lock
- uses: actions/setup-go@v4
if: env.GIT_DIFF
with:
go-version: 1.19
cache: true
cache-dependency-path: cw-relayer/go.sum
- name: Generate Cargo.lock
if: env.GIT_DIFF
run: |
cargo fetch --verbose --manifest-path ./cosmwasm/Cargo.toml
- name: cache docker layer
uses: satackey/action-docker-layer-caching@v0.0.11
if: env.GIT_DIFF
continue-on-error: true
- name: Test E2E
if: env.GIT_DIFF
run: |
make test-e2e