-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (42 loc) · 1.61 KB
/
code-review.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
name: Code Review
on:
workflow_dispatch:
inputs:
pullNumber:
description: 'Number of the pull request to review'
required: true
pull_request_target:
concurrency:
group: ${{ github.workflow }}-${{ github.event.inputs.pullNumber || github.event.number }}
cancel-in-progress: true
jobs:
code_review:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- name: 👀 Checkout
uses: actions/checkout@v4
- name: ➕ Add `bin` to GITHUB_PATH
run: echo "$(pwd)/bin" >> $GITHUB_PATH
- name: ♻️ Restore caches
uses: ./.github/actions/expo-caches
with:
yarn-tools: 'true'
### This job is run on Ubuntu which doesn't have SwiftLint installed, so we need to build it from sources.
### Building it on each run may take too much time, so we bundle the binary in `@expo/swiftlint` package.
### To update SwiftLint, uncomment steps below, download the artifact and update that package.
# - name: 👷 Build and install SwiftLint
# run: |
# git clone https://github.com/realm/SwiftLint.git --branch 0.52.2 --depth 1
# cd SwiftLint
# swift build -c release
# cp .build/release/swiftlint /usr/local/bin/
# - name: 📦 Make an artifact
# uses: actions/upload-artifact@v4
# with:
# name: swiftlint
# path: SwiftLint/.build
- name: 🔬 Reviewing a pull request
run: expotools code-review --pr ${{ github.event.inputs.pullNumber || github.event.number }}
env:
GITHUB_TOKEN: ${{ secrets.EXPO_BOT_GITHUB_TOKEN }}