-
-
Notifications
You must be signed in to change notification settings - Fork 23
103 lines (98 loc) · 3.12 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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: CI
on:
- pull_request
- push
jobs:
pest:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: ['8.1']
name: Pest - PHP ${{ matrix.php }}
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, mbstring, soap, bcmath, pdo_sqlite, intl
coverage: pcov
- uses: ramsey/composer-install@v1
with:
composer-options: "--prefer-dist --optimize-autoloader --ignore-platform-reqs"
- name: Run PestPHP
run: vendor/bin/pest --coverage --coverage-clover test-results/pest.xml
env:
AWS_ACCESS_KEY_ID: fake
AWS_SECRET_ACCESS_KEY: fake
AWS_SESSION_TOKEN: fake
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: pest-${{ matrix.php }}
file: test-results/pest.xml
larastan:
runs-on: ubuntu-latest
name: Larastan
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: soap, bcmath, pdo_sqlite, intl
- uses: ramsey/composer-install@v1
with:
composer-options: "--prefer-dist --optimize-autoloader --ignore-platform-reqs"
- name: Run Larastan
run: vendor/bin/phpstan analyse --no-progress
eslint:
runs-on: ubuntu-latest
name: ESLint
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: yarn install
- name: Run ESLint
run: yarn run lint
jest:
runs-on: ubuntu-latest
name: Jest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '15'
- name: Install dependencies
run: yarn install
- name: Run Jest
run: yarn test --coverage --coverageDirectory=test-results/jest
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: jest
file: test-results/jest/clover.xml
# phpcs:
# runs-on: ubuntu-latest
# name: PHP Style Fixer
# steps:
# - uses: actions/checkout@v2
# - uses: shivammathur/setup-php@v2
# with:
# php-version: '7.4'
# extensions: soap, bcmath, pdo_sqlite
# - 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
# run: composer install --no-interaction --no-progress --prefer-dist --optimize-autoloader --ignore-platform-reqs
# - name: Run PHP-CS-Fixer
# run: vendor/bin/php-cs-fixer fix --dry-run --diff --allow-risky=yes