generated from klientjs/open-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.1 KB
/
tests.yml
File metadata and controls
55 lines (45 loc) · 1.1 KB
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
name: Code analysis
on:
push:
pull_request:
types: [reopened]
workflow_dispatch:
inputs:
node:
type: choice
description: Node version
required: false
options:
- ''
- 20.x
- 18.x
- 16.x
- 14.x
- 12.x
permissions: read-all
jobs:
ci:
runs-on: ubuntu-latest
env:
NODE_VERSION: ${{ github.event.inputs.node || vars.NODE_VERSION || '16.x' }}
CACHE: ${{ vars.CACHE_DEPENDENCIES != '0' && 'npm' || '' }}
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: ${{ env.CACHE }}
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Check vulnerabilities
continue-on-error: true
run: npm audit
- name: Prettier check
run: npm run prettier
- name: Linter check
run: npm run lint
- name: Run tests suites
run: npm run test
- name: Build dist files
run: npm run dist