-
Notifications
You must be signed in to change notification settings - Fork 34
114 lines (98 loc) · 2.86 KB
/
hive.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
110
111
112
113
114
# Runs `ethereum/hive` tests.
name: hive
on:
workflow_dispatch:
schedule:
# every day
- cron: "13 21 * * *" # 21:13 UTC
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# Except in `nightly` and `stable` branches! Any cancelled job will cause the
# CI run to fail, and we want to keep a clean history for major branches.
cancel-in-progress: ${{ (github.ref != 'refs/heads/nightly') && (github.ref != 'refs/heads/stable') }}
jobs:
docker:
timeout-minutes: 60
name: Build and publish Docker image
runs-on: ubicloud-standard-16
steps:
- uses: actions/checkout@v4
- name: Docker Setup Buildx
uses: docker/[email protected]
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
context: .
file: ./hive/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/citrea:latest
prepare:
timeout-minutes: 45
runs-on: ubicloud-standard-4
steps:
- uses: actions/checkout@v4
- run: mkdir artifacts
- name: Checkout hive tests
uses: actions/checkout@v4
with:
repository: chainwayxyz/hive
ref: main
path: hivetests
- uses: actions/setup-go@v5
with:
go-version: "^1.13.1"
- run: go version
- name: Build hive tool
run: |
cd hivetests
go build .
mv ./hive ../artifacts/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts
path: ./artifacts
test:
timeout-minutes: 15
strategy:
fail-fast: false
needs: [docker, prepare]
name: run
runs-on: ubicloud-standard-4
permissions:
issues: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: artifacts
path: /tmp
- name: Move hive binary
run: |
mv /tmp/hive /usr/local/bin
chmod +x /usr/local/bin/hive
- name: Checkout hive tests
uses: actions/checkout@v4
with:
repository: chainwayxyz/hive
ref: main
path: hivetests
- name: Run ethereum/rpc simulator
run: |
cd hivetests
hive --sim "ethereum/rpc" --sim.limit "/http" --client citrea
- name: Print simulator output
if: ${{ failure() }}
run: |
cat hivetests/workspace/logs/*simulator*.log
- name: Print citrea client logs
if: ${{ failure() }}
run: |
cat hivetests/workspace/logs/citrea/client-*.log