-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (39 loc) · 1.15 KB
/
basic-validation.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
# Based on workflow: https://github.com/actions/reusable-workflows/blob/main/.github/workflows/basic-validation.yml
# - Modified to use `yarn` instead of `npm`
#
# This workflow helps ensure that the code for the action we're going to deploy:
# 1. Does not have dependencies with critical or high severity vulnerabilities
# 2. Is well-formatted
# 3. Is linted
# 4. Successfully builds
# 5. Passes unit-tests
name: Basic validation
on:
pull_request:
push:
branches:
- main
jobs:
basic-validation:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Setup Yarn
run: corepack enable
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-scripts
- name: Audit dependencies
run: yarn audit --audit-level=high --groups=dependencies
- name: Run prettier
run: yarn run format
- name: Run linter
run: yarn run lint
- name: Build
run: yarn run build
- name: Test
run: yarn run test:ci