forked from joostdecock/remark-copy-linked-files
-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (106 loc) · 3.79 KB
/
on-push.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
104
105
106
107
108
109
110
111
112
name: Continuous Integration
on: push
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: technote-space/auto-cancel-redundant-job@v1
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: '13.x'
- name: Setup Cache
uses: actions/[email protected]
with:
path: .yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
run: yarn install --immutable
env:
YARN_CHECKSUM_BEHAVIOR: update
###############################################################################
# COMMITLINT #
###############################################################################
commitlint:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Commit Lint
uses: wagoid/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
###############################################################################
# ESLINT #
###############################################################################
eslint:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: '13.x'
- name: Setup Cache
uses: actions/[email protected]
with:
path: .yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: ESLint
run: yarn run eslint
###############################################################################
# TEST #
###############################################################################
test:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: '13.x'
- name: Setup Cache
uses: actions/[email protected]
with:
path: .yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Test
run: yarn run test
- uses: devmasx/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
result_path: coverage/lcov.info
min_coverage: 90
type: lcov
###############################################################################
# RELEASE #
###############################################################################
release:
needs: [test, eslint, commitlint]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get branch
uses: rlespinasse/[email protected]
- name: Release
uses: ridedott/[email protected]
if: ${{ env.GITHUB_REF_SLUG == 'master' }}
with:
node-module: true
release-rules: '[{"scope":"deps-dev","release":false},{"scope":"no-release","release":false},{"release":"patch","type":"build"},{"release":"patch","type":"chore"},{"release":"patch","type":"ci"},{"release":"patch","type":"docs"},{"release":"patch","type":"improvement"},{"release":"patch","type":"refactor"},{"release":"minor","type":"feat"},{"release":false,"subject":"*\\[skip release\\]*"}]'
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}