-
-
Notifications
You must be signed in to change notification settings - Fork 8
74 lines (65 loc) · 2.31 KB
/
ci-packages.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
---
on: # yamllint disable-line rule:truthy
pull_request:
types:
- opened
- synchronize
- reopened
# Only consider those paths to trigger the action
paths:
- 'packages/**'
- 'package.json'
- 'pnpm*'
- '.github/**'
- 'tsconfig.base.json'
name: 🔍 Continuous integration for packages
jobs:
integration:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ['ubuntu-latest']
node: ['18']
env:
TURBO_API: 'http://127.0.0.1:9080'
TURBO_TEAM: 'next-starter-tpl'
TURBO_TOKEN: 'local_server_turbo_relaxed_token'
steps:
- name: 📦 Check out the codebase
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
# We need to fetch all the history for the "changed files" feature to work
fetch-depth: 0
- name: ⚙️ Setup node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org/'
- name: 🚀 Setup TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}
- name: 📥 Monorepo install
uses: wayofdev/gh-actions/actions/pnpm-install@master
with:
enable-corepack: true
cache-node-modules: true
# see https://github.com/vercel/next.js/pull/27362
- name: ♻️ Restore packages cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/.cache
${{ github.workspace }}/**/tsconfig.tsbuildinfo
key: packages-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
# Typecheck packages that have changed + packages and apps that depends on them (--from & --since)
# That allows to see if we're introducing "surface" regressions (just the types)
- name: 📝 Typecheck
run: |
pnpm --filter "...[origin/master]" --changed-files-ignore-pattern="apps/*" run lint:types
# Lint packages that have changed (--include & --since)
- name: 🚨 Linter
run: |
pnpm --filter "...[origin/master]" --changed-files-ignore-pattern="apps/*" run lint