forked from sid88in/serverless-appsync-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 976 Bytes
/
ci.yml
File metadata and controls
44 lines (42 loc) · 976 Bytes
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
name: Tests
on:
pull_request:
branches:
- master
- alpha
push:
branches:
- master
- alpha
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16, 18, 20, 22, 24]
steps:
- uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node }}
- name: Checkout code
uses: actions/checkout@v5
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Tests
run: npm run test
- name: Run npm pack dry-run
run: npm pack --dry-run
- name: Check if lib directory exists
run: |
if [ ! -d "lib" ]; then
echo "Error: lib directory does not exist"
exit 1
fi
- name: Check if lib directory has files
run: |
if [ -z "$(ls -A lib)" ]; then
echo "Error: lib directory is empty"
exit 1
fi