-
Notifications
You must be signed in to change notification settings - Fork 6
51 lines (42 loc) · 1.19 KB
/
code-review.yaml
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
# This workflow will perform the code review on each code change.
# It uses "actions/cache" and turborepo in order to perform tasks only on changed files.
name: "Code Review"
on:
push:
branches: ["main"]
paths:
- apps/**
- packages/**
pull_request:
types: [opened, synchronize]
paths:
- apps/**
- packages/**
workflow_dispatch: {}
jobs:
code_review:
timeout-minutes: 10 # temp fix
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version-file: ".node-version"
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Cache turbo build setup
uses: actions/cache@v3
with:
path: node_modules/.cache/turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: "Generate API models"
run: yarn workspaces foreach --all run generate:api-models
- name: "Code review"
run: yarn run code-review