-
Notifications
You must be signed in to change notification settings - Fork 50
93 lines (85 loc) · 3.13 KB
/
event_pr.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
name: ⚡ Pull-Request
run-name: 'PR / ${{ github.event.pull_request.title }}'
on:
pull_request:
types:
- opened # A pull request was created.
- reopened # A closed pull request was reopened.
- edited # A pull request's title, body, or labels are edited.
- synchronize # A pull request's branch was synchronized with its base branch.
- unlocked # Conversation on a pull request was unlocked.
concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
id-token: write
issues: read
pull-requests: write
jobs:
check_pr:
name: Check PR
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- name: Check PR Title
uses: aslafy-z/conventional-pr-title-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
paths-filter:
name: Paths Filter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: WalletConnect/actions/github/paths-filter/@2.2.1
id: filter
outputs:
infra: ${{ steps.filter.outputs.infra }}
app: ${{ steps.filter.outputs.app }}
ci:
name: CI
needs: [ paths-filter ]
uses: WalletConnect/ci_workflows/.github/workflows/[email protected]
secrets: inherit
with:
check-app: ${{ needs.paths-filter.outputs.app == 'true' }}
check-infra: ${{ needs.paths-filter.outputs.infra == 'true' }}
check-udeps: false
rust-toolchain: stable
rust-test-args: --features=full,test-localhost --lib --bins
test_bundler:
name: Test with mock bundler
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.PRIVATE_SUBMODULE_ACCESS_TOKEN || github.token }}
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- run: rustup update stable && rustup default stable
- run: cd irn && docker compose up -d
- run: docker compose up -d redis postgres
- run: docker compose -f docker-compose.mock-bundler.yaml up -d
- run: while ! curl localhost:5432/health; do sleep 1; done # Postgres
- run: while ! curl localhost:6379/health; do sleep 1; done # Redis
- run: while ! curl localhost:8545/health; do sleep 1; done # Anvil
- run: while ! curl localhost:4337/health; do sleep 1; done # Mock Bundler
- run: while ! curl localhost:3000/ping; do sleep 1; done # Mock Paymaster
- run: cargo test --features=test-mock-bundler --lib --bins
env:
RPC_PROXY_POSTGRES_URI: "postgres://postgres@localhost/postgres"
RPC_PROXY_PROVIDER_INFURA_PROJECT_ID: ""
RPC_PROXY_PROVIDER_POKT_PROJECT_ID: ""
RPC_PROXY_PROVIDER_QUICKNODE_API_TOKENS: ""
RPC_PROXY_PROVIDER_PIMLICO_API_KEY: ""
RPC_PROXY_PROVIDER_SOLSCAN_API_V1_TOKEN: ""
RPC_PROXY_PROVIDER_SOLSCAN_API_V2_TOKEN: ""
merge_check:
name: Merge Check
needs: [ check_pr, ci ]
if: ${{ always() && !cancelled() && !failure() }}
runs-on: ubuntu-latest
steps:
- run: echo "CI is successful"