generated from t3kit/t3kit-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (64 loc) · 2.17 KB
/
code-guidelines.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
82
83
name: Code Guidelines
# https://github.com/t3kit/.github/blob/master/CONTRIBUTING.md#coding-rules
on: [push, pull_request]
jobs:
main:
name: Check Code Guidelines
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
php-version: ['8.0']
steps:
- uses: actions/checkout@v2
- name: Lint shell scripts with Shellcheck
run: shellcheck -e SC1091 .localconf/**/*.sh
- name: Set up PHP v${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
- name: Set up Node.js v${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Get composer cache directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install Composer dependencies
# env:
# COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_SECRET }}" }}'
run: composer install --prefer-dist --no-progress
- name: Run composer test
run: composer test
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('public/typo3conf/ext/**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm@^8
run: npm install -g npm@^8
- name: Install npm dependencies
run: npm ci --ignore-scripts
- name: Run npm test
run: npm test
- name: Build theme assets
run: npm run dev
- name: PKG versions
run: |
node -v
npm -v
php -v
composer -v