-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (68 loc) · 1.76 KB
/
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
name: CI
on:
pull_request:
push:
branches: [main]
jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: noahnu/.github/.github/actions/setup-node@main
lint:
name: Lint
runs-on: ubuntu-latest
needs: [prepare]
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: noahnu/.github/.github/actions/setup-node@main
- name: Run Lint
run: |
yarn lint:ci
build:
name: Build
runs-on: ubuntu-latest
needs: [prepare]
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: noahnu/.github/.github/actions/setup-node@main
- name: Run Build
run: |
yarn build
test:
name: Test
runs-on: ubuntu-latest
needs: [prepare]
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: noahnu/.github/.github/actions/setup-node@main
- name: Run Test
run: |
yarn test
preview:
name: Preview
runs-on: ubuntu-latest
needs: [prepare]
if: "!contains(github.event.head_commit.message, '[skip ci]') && github.event_name == 'pull_request'"
permissions:
contents: read
pull-requests: write
steps:
- uses: noahnu/.github/.github/actions/setup-node@main
- name: Post Preview
uses: monoweave/github-action-preview@95e30cfa4b8dfb69cb8d18050ef05a207c6f8551 # v1.1.0
required_checks:
name: Required Checks
needs:
- prepare
- build
- lint
- test
runs-on: ubuntu-latest
if: always()
steps:
- name: Fail on error
if: contains(needs.*.result, 'failure') || cancelled()
run: exit 1