-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.16 KB
/
node.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
name: CI for AnzuSystems Notification-Server by Petit Press a.s. (www.sme.sk)
on:
push:
branches:
- '**'
pull_request:
branches:
- main
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
lint:
strategy:
matrix:
include:
- node-version: 20
docker-image: anzusystems/node:1.0.0-node20
name: Node ${{ matrix.node-version }}
runs-on: ubuntu-latest
container: ${{ matrix.docker-image }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Yarn packages
id: yarn-cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock', '*/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --immutable
- name: Run Yarn Build and checks
run: yarn production
- name: Run Security check
run: yarn npm audit
- name: Run Yarn Tests
run: yarn test