-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.31 KB
/
crystallize-cli-ci.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
52
53
54
55
name: Crystallize CLI
on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize, reopened]
jobs:
lint:
name: 🧹 Check conventions
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 💄 Prettier
uses: actionsx/prettier@v2
with:
args: --check components/crystallize-cli
- uses: wagoid/commitlint-github-action@v5
with:
configFile: components/crystallize-cli/commitlint.config.cjs
test:
name: 🧪 Tests
runs-on: ubuntu-latest
needs: [lint]
strategy:
matrix:
node: [16, 18]
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
# The `rm` here is to run outside of the mono workspace
- name: 📥 Download deps and build
run: |
rm -rf package.json yarn.lock node_modules
cd components/crystallize-cli && yarn install && yarn build
- name: 🏄 Run the tests
run: |
cd components/crystallize-cli && yarn test