-
Notifications
You must be signed in to change notification settings - Fork 73
42 lines (39 loc) · 940 Bytes
/
test.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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
# Checks for changes outside of /modules directory
changes:
runs-on: ubuntu-latest
outputs:
autobuilder: ${{ steps.filter.outputs.autobuilder }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
# set autobuilder filter true
# if any changes outside of modules directory
filters: |
autobuilder:
- '!(modules/**)'
test:
needs: changes
if: ${{ needs.changes.outputs.autobuilder == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: Install dependencies
run: npm install --dev
- name: Lint
run: npm run lint && npm run format
- name: Test
run: npm test