Skip to content

Commit 59add05

Browse files
committed
fast CI receipt
1 parent 27f3bfe commit 59add05

File tree

1 file changed

+46
-1
lines changed

1 file changed

+46
-1
lines changed

book/src/ci/ci.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,49 @@
22

33
Here we describe our good practices for structuring different types of tests in Continuous Integration (GitHub Actions).
44

5-
Follow [this](https://github.com/smartcontractkit/.github/tree/main/.github/workflows) guide.
5+
The simplest flow can look like:
6+
7+
Set up secrets in your GitHub repository
8+
```
9+
gh secret set CTF_SIMULATED_KEY_1 --body "..."
10+
```
11+
12+
Add a workflow
13+
```yaml
14+
name: Run E2E tests
15+
16+
on:
17+
push:
18+
19+
jobs:
20+
test:
21+
runs-on: ubuntu-latest
22+
env:
23+
CTF_CONFIGS: smoke.toml
24+
CTF_LOG_LEVEL: info
25+
CTF_LOKI_STREAM: "false"
26+
PRIVATE_KEY: ${{ secrets.CTF_SIMULATED_KEY_1 }}
27+
steps:
28+
- name: Check out code
29+
uses: actions/checkout@v3
30+
- name: Set up Go
31+
uses: actions/setup-go@v4
32+
with:
33+
go-version: 1.22.8
34+
- name: Cache Go modules
35+
uses: actions/cache@v3
36+
with:
37+
path: |
38+
~/.cache/go-build
39+
~/go/pkg/mod
40+
key: go-modules-${{ hashFiles('**/go.sum') }}-${{ runner.os }}
41+
restore-keys: |
42+
go-modules-${{ hashFiles('**/go.sum') }}-${{ runner.os }}
43+
- name: Install dependencies
44+
run: go mod download
45+
- name: Run tests
46+
working-directory: e2e/capabilities
47+
run: go test -v -run TestDON
48+
```
49+
50+
If you need to structure a lot of different end-to-end tests follow [this](https://github.com/smartcontractkit/.github/tree/main/.github/workflows) guide.

0 commit comments

Comments
 (0)