-
-
Notifications
You must be signed in to change notification settings - Fork 99
103 lines (94 loc) · 2.93 KB
/
ci.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
name: CI
on:
merge_group:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
commitlint:
name: Commit
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
name: Install pnpm
with:
version: 8
- name: Install with pnpm
run: pnpm install --frozen-lockfile
- name: Check commit message
uses: wagoid/commitlint-github-action@a2bc521d745b1ba127ee2f8b02d6afaa4eed035c # v6.1.1
with:
configFile: commitlint.config.cjs
failOnWarnings: false
helpURL: https://github.com/ducktors/turborepo-remote-cache#how-to-commit
install:
runs-on: ${{ matrix.os }}
name: Install
strategy:
matrix:
node-version: [18.x, 20.x]
os: [ubuntu-latest, macos-latest]
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
name: Checkout
- name: Use Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ matrix.node-version }}
- name: Install with npm
run: |
cd ${{ github.workspace }}
mkdir npm-repro
cd npm-repro
npm init -y
npm install turborepo-remote-cache
- name: Install with yarn
run: |
cd ${{ github.workspace }}
mkdir yarn-repro
cd yarn-repro
npm init -y
yarn add turborepo-remote-cache
build:
runs-on: ${{ matrix.os }}
name: Build
strategy:
matrix:
node-version: [18.x, 20.x]
os: [ubuntu-latest]
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
name: Checkout
- name: Use Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
name: Install pnpm
with:
version: 8
- name: Install with pnpm
run: pnpm install
- name: Lint code
run: pnpm lint
- name: Build
run: pnpm build