-
Notifications
You must be signed in to change notification settings - Fork 15
81 lines (58 loc) · 1.73 KB
/
lint.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
name: Lint
on:
push:
branches:
- master
pull_request:
jobs:
lint-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Set registry authentication token
run: echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install dependencies
run: npm install
- name: Run ESLint
run: npm run lint
lint-php:
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-suggest --prefer-dist --ignore-platform-reqs
- name: Copy .env
run: cp .env.example .env
- name: Set testing key
run: echo "APP_KEY=base64:STZFA4bQKDjE2mlpRPmsJ/okG0eCh4RHd9BghtZeYmQ=" >> .env
- name: Run Linter
run: composer lint -- --error-format=github
cs-php:
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: cs2pr
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-suggest --prefer-dist --ignore-platform-reqs
- name: Copy .env
run: cp .env.example .env
- name: Set testing key
run: echo "APP_KEY=base64:STZFA4bQKDjE2mlpRPmsJ/okG0eCh4RHd9BghtZeYmQ=" >> .env
- name: Run PHP-CS fixer and cs2pr
run: composer fix -- -vvv --dry-run --format=checkstyle | cs2pr