-
Notifications
You must be signed in to change notification settings - Fork 20
69 lines (59 loc) · 1.74 KB
/
js.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
name: CheckJS
on:
# Run on relevant pushes to select branches and on all relevant pull requests.
push:
branches:
- main
- develop
- 'release/[0-9]+.[0-9]+*'
- 'hotfix/[0-9]+.[0-9]+*'
paths:
- '**.js' # Includes Gruntfile.js.
- '.eslintignore'
- '.eslintrc'
- 'package.json'
- 'yarn.lock'
- '.github/workflows/js.yml'
- 'grunt/**'
pull_request:
paths:
- '**.js' # Includes Gruntfile.js.
- '.eslintignore'
- '.eslintrc'
- 'package.json'
- 'yarn.lock'
- '.github/workflows/js.yml'
- 'grunt/**'
# Allow manually triggering the workflow.
workflow_dispatch:
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
grunt:
runs-on: ubuntu-latest
name: "CheckJS"
steps:
- name: Checkout code
uses: actions/checkout@v4
# The ubuntu images come with Node, npm and yarn pre-installed.
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
# This action also handles the caching of the Yarn dependencies.
# https://github.com/actions/setup-node
- name: Set up node and enable caching of dependencies
uses: actions/setup-node@v3
with:
node-version: '14'
cache: 'yarn'
- name: Yarn install
run: yarn install
- name: Show debug info
run: |
npm --version
node --version
yarn --version
grunt --version
- name: Run Grunt tasks
run: grunt check