Merge pull request #17891 from MauricioFauth/frontend-workflow
Add Actions workflow for JS/CSS lint and test
This commit is contained in:
commit
5bb6b42868
76
.github/workflows/frontend-tests.yml
vendored
Normal file
76
.github/workflows/frontend-tests.yml
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
name: Frontend analysis and tests
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'js/**'
|
||||
- '**.s?css'
|
||||
- 'test/javascript/**'
|
||||
- '.browserslistrc'
|
||||
- '.eslint*'
|
||||
- '*.cjs'
|
||||
- 'package.json'
|
||||
- 'tsconfig.json'
|
||||
- 'yarn.lock'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
javascript-test:
|
||||
name: Test JavaScript files
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '14'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install modules
|
||||
run: yarn install --non-interactive
|
||||
|
||||
- name: Run tests
|
||||
run: yarn test
|
||||
|
||||
javascript-lint:
|
||||
name: Lint JavaScript files
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '14'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install modules
|
||||
run: yarn install --non-interactive
|
||||
|
||||
- name: Lint JavaScript files
|
||||
run: yarn run js-lint --quiet
|
||||
|
||||
css-lint:
|
||||
name: Lint CSS files
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '14'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install modules
|
||||
run: yarn install --non-interactive
|
||||
|
||||
- name: Lint CSS files
|
||||
run: yarn run css-lint
|
||||
21
.github/workflows/lint-and-analyse-php.yml
vendored
21
.github/workflows/lint-and-analyse-php.yml
vendored
@ -12,27 +12,6 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lint-node:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '14'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install modules
|
||||
run: yarn install --non-interactive
|
||||
|
||||
- name: Lint JavaScript files
|
||||
run: yarn run js-lint --quiet
|
||||
|
||||
- name: Lint CSS files
|
||||
run: yarn run css-lint
|
||||
|
||||
lint-php-files:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
|
||||
19
.github/workflows/tests.yml
vendored
19
.github/workflows/tests.yml
vendored
@ -189,22 +189,3 @@ jobs:
|
||||
with:
|
||||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
coverage-reports: build/logs/clover.xml
|
||||
|
||||
test-js:
|
||||
name: Test javascript files
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '14'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install modules
|
||||
run: yarn install --non-interactive
|
||||
|
||||
- name: Run tests
|
||||
run: yarn test
|
||||
|
||||
Loading…
Reference in New Issue
Block a user