-
Notifications
You must be signed in to change notification settings - Fork 240
109 lines (106 loc) · 3.46 KB
/
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: integration tests
on:
merge_group:
pull_request:
push:
branches:
- main
- release/**
tags:
- "*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
integration_tests:
runs-on: ubuntu-latest
timeout-minutes: 240
strategy:
matrix:
tests: [unmarked, ibc, ibc_rly_evm, ibc_rly_gas, ibc_timeout, ibc_update_client, ica, gov, upgrade, slow, gas]
env:
TESTS_TO_RUN: ${{ matrix.tests }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: changed-files
uses: tj-actions/changed-files@v41
with:
files: |
docs
*.md
**/*.md
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-22.11
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
if: steps.changed-files.outputs.only_changed == 'false'
- uses: cachix/cachix-action@v12
if: steps.changed-files.outputs.only_changed == 'false'
with:
name: cronos
extraPullNames: dapp
# github don't pass secrets for pull request from fork repos,
# in that case the push is disabled naturally.
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- name: Run integration tests
if: steps.changed-files.outputs.only_changed == 'false'
run: make run-integration-tests
- name: 'Tar debug files'
if: failure()
run: tar cfz debug_files.tar.gz -C "${TMPDIR-/tmp}/pytest-of-runner" .
- uses: actions/upload-artifact@v3
if: failure()
with:
name: debug-files
path: debug_files.tar.gz
if-no-files-found: ignore
- name: Convert coverage data
if: steps.changed-files.outputs.only_changed == 'false'
run: |
nix profile install ./nix#go_1_22
go tool covdata textfmt -i=integration_tests/coverage -o profile.txt
- name: Upload coverage report
if: steps.changed-files.outputs.only_changed == 'false'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./profile.txt
flags: integration_tests
upload-cache:
if: github.event_name == 'push'
needs: ["integration_tests"]
strategy:
matrix:
os: [macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: changed-files
uses: tj-actions/changed-files@v41
with:
files: |
docs
*.md
**/*.md
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-22.11
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
if: steps.changed-files.outputs.only_changed == 'false'
- uses: cachix/cachix-action@v12
if: steps.changed-files.outputs.only_changed == 'false'
with:
name: cronos
extraPullNames: dapp
# github don't pass secrets for pull request from fork repos,
# in that case the push is disabled naturally.
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- name: 'instantiate integration test env'
if: steps.changed-files.outputs.only_changed == 'false'
run: nix-store -r $(nix-instantiate integration_tests/shell.nix)