-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.97 KB
/
ci.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
name: CI
on: [push]
jobs:
lint_php:
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up PHP and composer
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
tools: composer:v1
- name: Lint PHP syntax
run: composer phplint
- name: Instal composer dependencies
run: composer install
- name: Lint PHP code using PHP_CodeSniffer
run: composer phpcs
test_custom_php_sniffs:
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up PHP and composer
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
tools: composer:v1
- name: Instal composer dependencies
run: composer install
- name: Run phpcs unit tests
run: vendor/bin/phpunit --no-configuration --bootstrap=vendor/squizlabs/php_codesniffer/tests/bootstrap.php --dont-report-useless-tests php/php-codesniffer-standard/VIISON/TestSuite.php
lint_javascript:
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install npm dependencies
run: npm install
- name: Lint JavaScript code using ESLint
run: npm run eslint
lint_structured_files:
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install npm dependencies
run: npm install
- name: Lint structured files using Prettier
run: npm run lint-structured-files