-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (48 loc) · 1.42 KB
/
lasuite.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
name: lasuite
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- '*'
jobs:
lint-git:
runs-on: ubuntu-latest
# Makes sense only for: 1) pull requests 2) that are not triggered by DecapCMS
if: github.event_name == 'pull_request' && !contains(github.event.pull_request.title, 'cms-bot')
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: show
run: git log
- name: Check absence of fixup commits
run: |
! git log | grep 'fixup!'
- name: Install gitlint
run: pip install --user requests gitlint
- name: Lint commit messages added to main
run: ~/.local/bin/gitlint --commits origin/${{ github.event.pull_request.base.ref }}..HEAD
lint-and-build:
runs-on: ubuntu-latest
# always do this, except if a PR is triggered by DecapCMS
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.title, 'cms-bot')
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint sources
run: yarn lint
- name: Format sources
run: yarn format
- name: Build sources
run: yarn build