-
Notifications
You must be signed in to change notification settings - Fork 27
76 lines (66 loc) · 2.41 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
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- "*"
env:
RELAYER_VERSION: v0.2.3
jobs:
teleporter-integration-test:
runs-on: ubuntu-20.04
timeout-minutes: 30
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
steps:
- name: Checkout repositories and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download awm-relayer image
run: |
docker pull avaplatform/awm-relayer:${RELAYER_VERSION}
- name: Teleporter Integration Tests
run: |
./scripts/local/test.sh
- name: Run Snyk on Docker image
# Dependabot isn't allowed to use the Snyk token, so skip this step.
if: ${{ ! startsWith(env.BRANCH_NAME, 'dependabot') }}
# TODO: Once we address the sarif upload issue below, we can re-enable
# continue-on-error to then upload the results to github.
# Snyk can be used to break the build when it detects vulnerabilities.
# In this case we want to upload the issues to GitHub Code Scanning
# continue-on-error: true
uses: snyk/actions/docker@master
env:
# In order to use the Snyk Action you will need to have a Snyk API token.
# More details in https://github.com/snyk/actions#getting-your-snyk-token
# or you can signup for free at https://snyk.io/login
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: local-network-image
args: --file=docker/Dockerfile --severity-threshold=high
# TODO: Investigate how to limit the snyk.sarif file to only have a maximum of 20 "runs" so the upload succeeds here.
# See: https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#validating-your-sarif-file
# - name: Upload results to GitHub Code Scanning
# uses: github/codeql-action/upload-sarif@v2
# with:
# sarif_file: snyk.sarif
solidity-unit-tests:
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run unit tests
run: |
cd contracts/
forge test -vvv