-
Notifications
You must be signed in to change notification settings - Fork 5
65 lines (58 loc) · 1.83 KB
/
publish.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
name: docker_publish
on:
push:
branches:
- 'chore/ci-publish-docker'
- 'main'
tags:
- '*'
pull_request:
branches:
- '**'
jobs:
lint_test:
uses: babylonlabs-io/.github/.github/workflows/[email protected]
with:
run-build: true
run-lint: true
run-unit-tests: true
run-check-mock-gen: true
run-gosec: true
gosec-args: "-exclude-generated -exclude-dir=testutil ./..."
docker_pipeline:
needs: ["lint_test"]
uses: babylonlabs-io/.github/.github/workflows/[email protected]
secrets: inherit
with:
publish: true
repoName: finality-gadget
test_finality_provider:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Clone finality-provider repository
run: |
current_hash=$(git rev-parse HEAD)
remote_url=$(git remote get-url origin)
if [[ $remote_url == https://* ]]; then
# For HTTPS URLs
repo_path=$(echo $remote_url | sed -E 's|https://github.com/(.+)(\.git)*|\1|')
else
# For SSH URLs
repo_path=$(echo $remote_url | sed -E 's/.*:(.+)\.git/\1/')
fi
fp_version=$(go list -m github.com/$repo_path@$current_hash)
git clone https://github.com/babylonlabs-io/finality-provider
cd finality-provider
git checkout base/consumer-chain-support
sed -i "s|github\.com\/babylonlabs-io\/finality-gadget.*|$fp_version|g" go.mod
go mod tidy
- name: Run op e2e tests
run: |
export PATH=${PATH}:$(go env GOPATH)/bin
cd finality-provider
make op-e2e-devnet
make test-e2e-op