-
Notifications
You must be signed in to change notification settings - Fork 101
94 lines (78 loc) · 2.44 KB
/
npm-grunt.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: NodeJS with Grunt
on:
push:
branches:
- "release"
- "main"
- "master"
pull_request:
branches:
- "release"
- "main"
- "master"
# Enable manual trigger
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Clean npm cache
run: npm cache clean --force
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential python3 gcc g++ make
- name: Setup Python 3
run: |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
python --version
- name: Update npm and node-gyp for Node 16
if: matrix.node-version == '16.x'
run: |
npm install -g npm@latest
npm install -g node-gyp@latest
npm config set node_gyp $(npm prefix -g)/lib/node_modules/node-gyp/bin/node-gyp.js
- name: Install Grunt CLI
run: npm install -g grunt-cli
- name: Install node-sass for Node 14
if: matrix.node-version == '14.x'
run: |
npm config set sass-binary-site=https://github.com/sass/node-sass/releases/download
npm install [email protected] --save-dev --force
npm rebuild node-sass
- name: Install node-sass for Node 16
if: matrix.node-version == '16.x'
run: |
npm config set sass-binary-site=https://github.com/sass/node-sass/releases/download
npm install [email protected] --save-dev --force
npm rebuild node-sass --update-binary
- name: Install specific dependencies first
run: |
npm install [email protected] --save-dev --force
npm install [email protected] --save-dev --force
npm install [email protected] --save-dev --force
npm install [email protected] --save-dev --force
npm install [email protected] --save-dev --force
- name: Install remaining dependencies
run: npm install --legacy-peer-deps --no-audit --force
- name: Display versions
run: |
npm -v
node -v
python --version
gcc --version
node-gyp -v
- name: Run Grunt
run: grunt --verbose