-
Notifications
You must be signed in to change notification settings - Fork 38
37 lines (37 loc) · 1.16 KB
/
ci.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
name: CI
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['18', '20', '22']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Get Npm cache directory path
id: npm-cache-dir-path
run: echo "::set-output name=dir::$(npm config get cache)"
- name: Npm cache
uses: actions/cache@v3
with:
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Test
env:
SITE: SHEPHERD_DOT_DIRECTORY="./fixtures/artifacts/.shepherd"
SHEPHERD_GITHUB_ENTERPRISE_URL: ${{ secrets.SHEPHERD_GITHUB_ENTERPRISE_URL }}
SHEPHERD_GITHUB_ENTERPRISE_BASE_URL: ${{ secrets.SHEPHERD_GITHUB_ENTERPRISE_BASE_URL }}
run: npm run test