-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (38 loc) · 1.54 KB
/
frontend-analysis.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
name: "Frontend Code Analysis + Style"
on:
- "push"
- "pull_request"
jobs:
frontend:
runs-on: "ubuntu-18.04"
strategy:
matrix:
php-versions: [ '7.4' ]
steps:
- uses: "actions/checkout@v2.0.0"
- name: "Setup PHP Action"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-versions }}"
extensions: "intl, xdebug, imagick, apcu"
- name: "Install SSH key"
uses: "shimataro/ssh-key-action@v2"
with:
key: "${{ secrets.SSH_KEY_CI }}"
name: "id_rsa"
known_hosts: "${{ secrets.SSH_KNOWN_HOST_AKENEO_EE }}"
# Install / Prepare
- name: "Add EE Composer repository"
run: "composer -n config repositories.ee vcs ${{ secrets.SSH_AKENEO_EE_REPOSITORY }}"
- name: "Install PHP dependencies"
run: "composer install --prefer-dist --no-interaction --optimize-autoloader --no-suggest --no-progress"
- name: "yarn install"
uses: "borales/actions-yarn@v2.0.0"
with:
cmd: "install"
- name: "Check for obsolete ts exports"
run: "yarn ts-unused-exports tsconfig.json $(find src/Resources/public -name '*.ts*') --showLineNumber"
- name: "Typescript linting"
run: "yarn tslint src/Resources/public/**/*.ts src/Resources/public/**/*.tsx src/Resources/public/**/**/*.tsx"
- name: "Coding Style"
run: "yarn prettier --config .prettierrc.json --check src/Resources/public/**/*.ts src/Resources/public/**/*.tsx jest/**/*.ts jest/**/*.tsx"