-
Notifications
You must be signed in to change notification settings - Fork 5
87 lines (71 loc) · 2.33 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
name: CCIP2ETH Test
on: [workflow_dispatch, push]
env:
FOUNDRY_PROFILE: ci
jobs:
check:
strategy:
fail-fast: true
name: CCIP2.ETH Resolver Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run Forge build
run: |
forge install foundry-rs/forge-std --no-commit --no-git
forge build --sizes
id: build
- name: Run Forge tests
run: |
forge test --fork-url https://rpc.ankr.com/eth_goerli -vvvv --fork-block-number 8897000
id: test
- name: Initialise status badge
run: cp .github/init.svg .github/badge.svg
- name: Set name of badge
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "checks"
replace: "Status"
include: ".github/badge.svg"
regex: false
- name: Capitalise test status
run: |
echo "STATUS=$(echo "${{ steps.test.outcome }}" | sed 's/\b./\U&/')" >> ${GITHUB_ENV}
- name: Set status of Forge tests
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "status"
replace: "${{ env.STATUS }}"
#replace: ${{ (steps.test.outcome == 'success' && 'Ser! 🥳') || 'Ser? ❌' }}
include: ".github/badge.svg"
regex: false
- name: Set color of outcome
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "3C1"
replace: "F73"
include: ".github/badge.svg"
regex: false
if: steps.test.outcome == 'failure'
- name: Commit changes to .github/badge.svg
uses: EndBug/add-and-commit@v8
with:
author_name: sshmatrix
author_email: cryptosauron@protonmail.com
message: auto-commit; render badge.svg
add: '.github/badge.svg'
- name: Push changes to .github/badge.svg
uses: ad-m/github-push-action@v0.6.0
with:
branch: main
force: true
github_token: ${{ secrets.TOKEN }}