Skip to content

Commit 7e42276

Browse files
committed
ci: Create commit and lint workflows
1 parent 097e18b commit 7e42276

2 files changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/commit.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Lint Commit Messages
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
commit:
7+
name: Lint commit messages
8+
runs-on: ubuntu-latest
9+
env:
10+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Install dependencies
19+
run: yarn
20+
21+
- name: Check commit message
22+
uses: wagoid/commitlint-github-action@v1
23+
env:
24+
NODE_PATH: ${{ github.workspace }}/node_modules

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lint
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
code:
7+
name: Lint code
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Set up Node
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: 12
20+
21+
- name: Install dependencies
22+
run: yarn
23+
24+
- name: Run ESLint
25+
run: yarn lint

0 commit comments

Comments
 (0)