Skip to content

Commit b9131b4

Browse files
committed
init
0 parents  commit b9131b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+11187
-0
lines changed

.dockerignore

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Git
2+
**/.git
3+
**/.gitignore
4+
5+
# Build artifacts
6+
**/bin
7+
**/*.test
8+
**/coverage.out
9+
**/cover.html
10+
**/*.exe
11+
**/*.dll
12+
**/*.so
13+
**/*.dylib
14+
15+
# Go workspace
16+
**/go.work
17+
18+
# Test and coverage
19+
**/*.pprof
20+
**/cpu.pprof
21+
**/mem.pprof
22+
23+
# Environment and config
24+
**/.env
25+
**/.env.*
26+
27+
# Logs
28+
**/*.log
29+
30+
# IDE
31+
**/.vscode
32+
**/.idea
33+
**/*.swp
34+
**/*.swo
35+
**/*~
36+
**/.DS_Store
37+
38+
# Temporary files
39+
**/tmp
40+
**/temp
41+
42+
# Node modules (for examples)
43+
**/node_modules
44+
**/npm-debug.log*
45+
**/yarn-debug.log*
46+
**/yarn-error.log*
47+
**/pnpm-debug.log*
48+
49+
# TypeScript build output
50+
**/dist
51+
**/build
52+
**/*.tsbuildinfo
53+
54+
# Vendor
55+
**/vendor
56+
57+
# Documentation (not needed in container)
58+
**/*.md
59+
!README.md
60+
**/LICENSE
61+
62+
# Examples (usually not needed in container)
63+
**/examples

.github/workflows/ci.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test:
11+
name: Test
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
go-version: ['1.21', '1.22', '1.23']
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Go
22+
uses: actions/setup-go@v5
23+
with:
24+
go-version: ${{ matrix.go-version }}
25+
26+
- name: Cache Go modules
27+
uses: actions/cache@v4
28+
with:
29+
path: |
30+
~/.cache/go-build
31+
~/go/pkg/mod
32+
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
33+
restore-keys: |
34+
${{ runner.os }}-go-${{ matrix.go-version }}-
35+
36+
- name: Download dependencies
37+
run: go mod download
38+
39+
- name: Run checks and tests
40+
run: make check
41+
42+
- name: Build examples
43+
run: make build_examples
44+
45+
integration:
46+
name: Integration Tests
47+
runs-on: ubuntu-latest
48+
needs: test
49+
50+
steps:
51+
- name: Checkout code
52+
uses: actions/checkout@v4
53+
54+
- name: Set up Go
55+
uses: actions/setup-go@v5
56+
with:
57+
go-version: '1.22'
58+
59+
- name: Download dependencies
60+
run: go mod download
61+
62+
- name: Start Tempo node
63+
run: docker compose up -d
64+
65+
- name: Wait for Tempo node to be ready
66+
run: |
67+
echo "Waiting for Tempo node to start..."
68+
for i in {1..30}; do
69+
if curl -s http://localhost:8545 > /dev/null 2>&1; then
70+
echo "Tempo node is ready!"
71+
exit 0
72+
fi
73+
echo "Attempt $i: Tempo node not ready yet..."
74+
sleep 2
75+
done
76+
echo "Tempo node failed to start"
77+
docker compose logs
78+
exit 1
79+
80+
- name: Run integration tests
81+
run: make integration
82+
env:
83+
TEMPO_RPC_URL: http://localhost:8545
84+
85+
- name: Show Tempo node logs on failure
86+
if: failure()
87+
run: docker compose logs
88+
89+
- name: Stop Tempo node
90+
if: always()
91+
run: docker compose down

.gitignore

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Test binary, built with `go test -c`
9+
*.test
10+
11+
# Output of the go coverage tool
12+
*.out
13+
cover.html
14+
15+
# Go workspace file
16+
go.work
17+
18+
# Build artifacts
19+
/server
20+
/server.exe
21+
/simple-send
22+
/feepayer
23+
bin/
24+
25+
# Profiling files
26+
*.pprof
27+
cpu.pprof
28+
mem.pprof
29+
30+
# Environment files (for examples)
31+
.env
32+
.env.local
33+
.env.*.local
34+
35+
# Logs
36+
*.log
37+
server.log
38+
39+
# IDE specific files
40+
.vscode/
41+
.idea/
42+
*.swp
43+
*.swo
44+
*~
45+
.DS_Store
46+
47+
# Temporary files
48+
tmp/
49+
temp/
50+
51+
# Docker volumes (if running locally without docker-compose)
52+
.docker/
53+
54+
# Node.js (for TypeScript client in examples/feepayer/client)
55+
node_modules/
56+
npm-debug.log*
57+
yarn-debug.log*
58+
yarn-error.log*
59+
pnpm-debug.log*
60+
61+
# TypeScript build output (for examples)
62+
dist/
63+
build/
64+
*.tsbuildinfo
65+
66+
# Go vendor directory
67+
vendor/

Dockerfile.tempo

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM ubuntu:24.04
2+
3+
ARG TEMPO_VERSION=v0.7.1
4+
5+
RUN apt-get update && apt-get install -y \
6+
curl \
7+
ca-certificates \
8+
grep \
9+
&& rm -rf /var/lib/apt/lists/*
10+
11+
RUN curl -L https://testnet-assets.tempoxyz.dev/binaries/${TEMPO_VERSION}/tempo-${TEMPO_VERSION}-x86_64-unknown-linux-gnu.tar.gz -o tempo.tar.gz && \
12+
tar -xzvf tempo.tar.gz && \
13+
chmod +x tempo-${TEMPO_VERSION}-x86_64-unknown-linux-gnu && \
14+
mv tempo-${TEMPO_VERSION}-x86_64-unknown-linux-gnu /usr/local/bin/tempo && \
15+
rm tempo.tar.gz
16+
17+
RUN tempo --version
18+
19+
COPY scripts/start-tempo.sh /usr/local/bin/start-tempo.sh
20+
RUN chmod +x /usr/local/bin/start-tempo.sh
21+
22+
EXPOSE 8545 30303
23+
24+
ENTRYPOINT ["/usr/local/bin/start-tempo.sh"]

0 commit comments

Comments
 (0)