-
Notifications
You must be signed in to change notification settings - Fork 10
40 lines (38 loc) · 988 Bytes
/
pr.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
name: Commitlint Lint Test & Build
on:
pull_request:
branches:
- main
- develop
workflow_dispatch:
jobs:
commitlint-lint-test-build:
runs-on: size-bertha
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: OpenJDK
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '11'
- name: Cache dependencies
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn install --immutable
# needs to run after install
- name: Commitlint PR title
env:
TITLE: ${{ github.event.pull_request.title }}
run: printf '%s' "$TITLE" | npx commitlint
- name: Build
run: yarn build
- name: Lint
run: yarn lint
- name: Test
run: yarn test