-
Notifications
You must be signed in to change notification settings - Fork 23
64 lines (62 loc) · 1.98 KB
/
qa.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
name: QA
on:
push:
branches:
- master
- '[1-9].[0-9]+.x'
- 'feature-[a-z]+'
pull_request: ~
jobs:
qa:
name: Code-Quality-Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout Gally admin
uses: actions/checkout@v3
with:
repository: 'Elastic-Suite/gally-admin'
ref: main
path: front/gally-admin
- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- uses: php-actions/composer@v6
with:
php_version: "8.1"
args: --working-dir api
# PHP-CS-Fixer cannot run locally since src/Gally has been moved elsewhere
#- name: PHP-CS-Fixer
# working-directory: api
# run: ./vendor/bin/php-cs-fixer fix --path-mode=intersection --diff --dry-run src/Gally
# PHPStan cannot run locally since src/Gally has been moved elsewhere
#- name: PHPStan
# working-directory: api
# run: ./vendor/bin/phpstan analyse src/Gally
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Yarn dependencies
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Yarn Install dependencies
working-directory: front
run: yarn --frozen-lockfile
- name: Yarn build
working-directory: front/gally-admin
run: yarn build
- name: Typescript
working-directory: front
run: yarn typescript:ci
- name: EsLint
working-directory: front
run: yarn eslint:ci
- name: Prettier
working-directory: front
run: yarn prettier:ci