-
Notifications
You must be signed in to change notification settings - Fork 19
56 lines (53 loc) · 1.48 KB
/
javascript-lint.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
name: Javascript Lint
on: pull_request
jobs:
changes:
runs-on: ubuntu-latest
outputs:
services: ${{ steps.filter.outputs.changes }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
token: ${{ github.token }}
filters: |
frontend:
- "frontend/**"
association-frontend:
- "association-frontend/**"
lint:
runs-on: ubuntu-latest
needs: [changes]
if: ${{ needs.changes.outputs.services != '[]' && needs.changes.outputs.services != '' }}
strategy:
fail-fast: false
matrix:
service: ${{ fromJSON(needs.changes.outputs.services) }}
defaults:
run:
working-directory: ./${{ matrix.service }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- uses: pnpm/action-setup@v2.2.2
with:
version: 7.3.0
- name: Cache dependencies
uses: actions/cache@v1
id: cache
with:
path: ./node_modules
key: node_modules-${{ matrix.service }}-${{ hashFiles('pnpm-lock.yaml') }}-v4
- name: Install dependencies
run: pnpm install
- name: Codegen
if: ${{ matrix.service == 'frontend' || matrix.service == 'association-frontend' }}
run: pnpm run codegen
- name: Lint
run: pnpm run lint
- name: TS Lint
run: pnpm run lint:ts
- name: Prettier
run: pnpm run lint:prettier