-
Notifications
You must be signed in to change notification settings - Fork 0
137 lines (113 loc) · 4.2 KB
/
Copy pathci.yml
File metadata and controls
137 lines (113 loc) · 4.2 KB
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: CipherBid CI
on:
pull_request:
branches: [development, staging, main]
push:
branches: [development, staging, main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
web:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
NEXT_PUBLIC_CIPHERBID_NETWORK: mainnet
NEXT_PUBLIC_STARKNET_RPC_URL: https://api.zan.top/public/starknet-mainnet/rpc/v0_10
NEXT_PUBLIC_AUCTION_HOUSE_ADDRESS: "0x01b32af8bab712ede82117b8ff1b8866e09798f6c81edc255ffe59dd42e4843e"
NEXT_PUBLIC_AUCTION_HOUSE_CLASS_HASH: "0x06aa99b7ae9e10619b5a3c1713a4d71054844d3dda8e21bef98db6e653d5efc4"
NEXT_PUBLIC_STRK20_POOL_ADDRESS: "0x040337b1af3c663e86e333bab5a4b28da8d4652a15a69beee2b677776ffe812a"
NEXT_PUBLIC_STRK_TOKEN_ADDRESS: "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.13.1
- name: Enable Corepack
run: corepack enable
- name: Install frontend dependencies
working-directory: web
run: pnpm install --frozen-lockfile
- name: Verify workflow policies
working-directory: web
run: |
pnpm ci:verify
pnpm pages:verify
- name: Check frontend formatting
working-directory: web
run: pnpm format:check
- name: Lint frontend
working-directory: web
run: pnpm lint
- name: Type-check frontend
working-directory: web
run: pnpm typecheck
- name: Test frontend
working-directory: web
run: pnpm test
- name: Install Chromium
working-directory: web
run: pnpm exec playwright install --with-deps chromium
- name: Test frontend in Chromium
working-directory: web
run: pnpm test:e2e
- name: Build frontend
working-directory: web
run: pnpm build
- name: Build static Pages artifact
working-directory: web
env:
CIPHERBID_PAGES_BUILD: "1"
run: pnpm build
cairo:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Scarb
uses: software-mansion/setup-scarb@2a96b748888e3329ee44ac9ac073d930e692b3cd # v1.6.2
with:
scarb-version: 2.20.1
cache: "false"
cache-targets: "false"
- name: Setup Universal Sierra Compiler
uses: software-mansion/setup-universal-sierra-compiler@30c139bca57cc0561cfae6f5353825bbc42c9f37 # v1.0.1
with:
universal-sierra-compiler-version: 2.10.0
- name: Install Starknet Foundry
shell: bash
run: |
set -euo pipefail
archive="$RUNNER_TEMP/starknet-foundry.tar.gz"
install_root="$RUNNER_TEMP/starknet-foundry"
curl --fail --location --silent --show-error --proto '=https' --tlsv1.2 \
https://github.com/foundry-rs/starknet-foundry/releases/download/v0.63.0/starknet-foundry-v0.63.0-x86_64-unknown-linux-gnu.tar.gz \
--output "$archive"
printf '%s %s\n' 'a861c13238fe0686e921820b9606065cf07b1ccc6cc22d95cd299cd78b37a869' "$archive" | sha256sum --check --strict
mkdir -p "$install_root"
tar -xzf "$archive" --strip-components=1 -C "$install_root"
printf '%s\n' "$install_root/bin" >> "$GITHUB_PATH"
- name: Verify Cairo toolchain
run: |
scarb --version
universal-sierra-compiler --version
snforge --version
- name: Check Cairo formatting
working-directory: contracts
run: scarb fmt --check
- name: Build Cairo contracts
working-directory: contracts
run: scarb build
- name: Test Cairo contracts
working-directory: contracts
run: snforge test