generated from jmmaranan/gnome-shell-ext-template
-
Notifications
You must be signed in to change notification settings - Fork 51
65 lines (54 loc) · 1.53 KB
/
testing.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# This workflow will install Node/NPM dependencies, run tests and lint source code
# For more information see:
#@ https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: testing
on:
push:
branches: ["main"]
paths-ignore:
- .git*
- .husky/**
- "*.md"
pull_request:
branches: ["main"]
types: [opened, reopened, synchronize, ready_for_review]
paths-ignore:
- .git*
- .husky/**
- "*.md"
workflow_dispatch:
inputs:
ref:
description: 'Override git ref'
type: string
default: ''
required: false
jobs:
linting:
strategy:
fail-fast: true
matrix:
os: ["ubuntu-22.04", "ubuntu-latest"]
node_version: ["18.x", "20.x", "latest"]
runs-on: "${{ matrix.os }}"
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Install linux tools
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends gettext make zip
- name: Set up Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- name: Install Node.js project dependencies
run: npm ci --verbose
- name: Build Node.js project
run: npm run build --if-present --verbose
- name: Test Node.js project
run: npm test --verbose
- name: Test Packaging
run: make dist