-
Notifications
You must be signed in to change notification settings - Fork 135
137 lines (116 loc) · 3.67 KB
/
on-pull-request.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Run checks on Pull Requests
on:
pull_request:
jobs:
enforce_title:
name: Enforce PR Title Format
runs-on: ubuntu-latest
steps:
- name: "Checkout files"
uses: actions/checkout@v3
with:
token: ${{ secrets.ALCHEMY_BOT_PAT }}
fetch-depth: "0"
submodules: "recursive"
- name: Setup
uses: ./.github/actions/setup
- name: Use commitlint to check PR title
env:
TITLE: ${{ github.event.pull_request.title }}
run: echo "$TITLE" | yarn commitlint
lint:
name: Lint
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.ALCHEMY_BOT_PAT }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
- name: "Checkout files"
uses: actions/checkout@v3
with:
token: ${{ secrets.ALCHEMY_BOT_PAT }}
fetch-depth: "0"
submodules: "recursive"
- name: Setup
uses: ./.github/actions/setup
- name: Build eslint plugin
run: |
cd templates/eslint && yarn build
- uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: Run eslint with reviewdog
run: |
npx --no-install -c "eslint -f=rdjson ." | reviewdog -f=rdjson -reporter=github-pr-review -filter-mode=added -tee
- name: Run eslint for errors
run: yarn lint:check
build_and_lint_and_test:
name: Build and Test
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
API_KEY: ${{ secrets.API_KEY }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
- name: "Checkout files"
uses: actions/checkout@v3
with:
token: ${{ secrets.ALCHEMY_BOT_PAT }}
fetch-depth: "0"
submodules: "recursive"
- name: Setup
uses: ./.github/actions/setup
# using your own fork url avoids getting rate limited by the public api
# later we'll look at deploying everything we need directly to anvil so
# so we don't need a fork url
- name: Conditionally set fork url
if: ${{ env.API_KEY != '' }}
run: echo "VITEST_SEPOLIA_FORK_URL=https://eth-sepolia.g.alchemy.com/v2/${{ env.API_KEY }}" >> $GITHUB_ENV
- name: Set up Rundler
uses: jaxxstorm/[email protected]
with:
repo: alchemyplatform/rundler
platform: linux
tag: v0.2.2
cache: enable
- name: Build Libraries
env:
API_KEY: ${{ secrets.API_KEY }}
JAVA_OPTS: "-XX:MaxHeapSize=6g"
run: yarn build:libs
- name: Unit Test
run: yarn test:ci
- name: Typecheck Test
run: yarn test:typecheck
build_ios:
name: Build iOS
runs-on: macos-14
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
API_KEY: ${{ secrets.API_KEY }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
- name: "Checkout files"
uses: actions/checkout@v3
with:
token: ${{ secrets.ALCHEMY_BOT_PAT }}
fetch-depth: "0"
submodules: "recursive"
- name: Setup
uses: ./.github/actions/setup
- name: Install cocoapods
working-directory: account-kit/rn-signer/example/ios
run: |
pod install
env:
NO_FLIPPER: 1
- name: Build example for iOS
run: |
yarn turbo run build:ios