forked from evmos/evmos
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (70 loc) · 1.88 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
name: Tests
on:
pull_request:
push:
branches:
- main
- release/**
permissions: read-all
jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"
test-unit-cover:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
.github/workflows/test.yml
**/**.sol
**/**.go
go.mod
go.sum
*.toml
- name: Test and Create Coverage Report
run: |
make test-unit-cover
if: env.GIT_DIFF
- uses: codecov/codecov-action@v4
with:
file: ./coverage.txt
# We were getting a 500 error on codecov servers
# so we decided to avoid blocking the CI if this fails
fail_ci_if_error: false
if: env.GIT_DIFF
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test-scripts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
.github/workflows/test.yml
./scripts/**
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip" # caching pip dependencies
if: env.GIT_DIFF
- name: Install Pytest
run: |
python -m pip install --upgrade pip
pip install pytest
if: env.GIT_DIFF
- name: Test Scripts
run: |
make test-scripts
if: env.GIT_DIFF