Skip to content

Commit 5bb6b42

Browse files
Merge pull request #17891 from MauricioFauth/frontend-workflow
Add Actions workflow for JS/CSS lint and test
2 parents 39c0b06 + 104b557 commit 5bb6b42

3 files changed

Lines changed: 76 additions & 40 deletions

File tree

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Frontend analysis and tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
paths:
7+
- 'js/**'
8+
- '**.s?css'
9+
- 'test/javascript/**'
10+
- '.browserslistrc'
11+
- '.eslint*'
12+
- '*.cjs'
13+
- 'package.json'
14+
- 'tsconfig.json'
15+
- 'yarn.lock'
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
javascript-test:
22+
name: Test JavaScript files
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v3
27+
28+
- name: Set up Node
29+
uses: actions/setup-node@v3
30+
with:
31+
node-version: '14'
32+
cache: 'yarn'
33+
34+
- name: Install modules
35+
run: yarn install --non-interactive
36+
37+
- name: Run tests
38+
run: yarn test
39+
40+
javascript-lint:
41+
name: Lint JavaScript files
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Checkout code
45+
uses: actions/checkout@v3
46+
47+
- name: Set up Node
48+
uses: actions/setup-node@v3
49+
with:
50+
node-version: '14'
51+
cache: 'yarn'
52+
53+
- name: Install modules
54+
run: yarn install --non-interactive
55+
56+
- name: Lint JavaScript files
57+
run: yarn run js-lint --quiet
58+
59+
css-lint:
60+
name: Lint CSS files
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Checkout code
64+
uses: actions/checkout@v3
65+
66+
- name: Set up Node
67+
uses: actions/setup-node@v3
68+
with:
69+
node-version: '14'
70+
cache: 'yarn'
71+
72+
- name: Install modules
73+
run: yarn install --non-interactive
74+
75+
- name: Lint CSS files
76+
run: yarn run css-lint

.github/workflows/lint-and-analyse-php.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,6 @@ permissions:
1212
contents: read
1313

1414
jobs:
15-
lint-node:
16-
runs-on: ubuntu-latest
17-
steps:
18-
- name: Checkout code
19-
uses: actions/checkout@v3
20-
21-
- name: Set up Node
22-
uses: actions/setup-node@v3
23-
with:
24-
node-version: '14'
25-
cache: 'yarn'
26-
27-
- name: Install modules
28-
run: yarn install --non-interactive
29-
30-
- name: Lint JavaScript files
31-
run: yarn run js-lint --quiet
32-
33-
- name: Lint CSS files
34-
run: yarn run css-lint
35-
3615
lint-php-files:
3716
runs-on: ubuntu-latest
3817
strategy:

.github/workflows/tests.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -189,22 +189,3 @@ jobs:
189189
with:
190190
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
191191
coverage-reports: build/logs/clover.xml
192-
193-
test-js:
194-
name: Test javascript files
195-
runs-on: ubuntu-latest
196-
steps:
197-
- name: Checkout code
198-
uses: actions/checkout@v3
199-
200-
- name: Set up Node
201-
uses: actions/setup-node@v3
202-
with:
203-
node-version: '14'
204-
cache: 'yarn'
205-
206-
- name: Install modules
207-
run: yarn install --non-interactive
208-
209-
- name: Run tests
210-
run: yarn test

0 commit comments

Comments
 (0)