Skip to content

Commit 2dbb164

Browse files
committed
Add ci
1 parent d058e40 commit 2dbb164

File tree

2 files changed

+67
-1
lines changed

2 files changed

+67
-1
lines changed

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI
2+
3+
on:
4+
- pull_request
5+
- push
6+
7+
jobs:
8+
pest:
9+
runs-on: ubuntu-latest
10+
name: PestPHP
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: shivammathur/setup-php@v2
14+
with:
15+
php-version: '8.0'
16+
extensions: dom, mbstring, soap, bcmath, pdo_sqlite, intl
17+
coverage: pcov
18+
- uses: ramsey/composer-install@v1
19+
with:
20+
composer-options: "--prefer-dist --optimize-autoloader --ignore-platform-reqs"
21+
- name: Run PestPHP
22+
run: vendor/bin/pest --coverage --coverage-clover test-results/coverage.xml
23+
- name: Upload coverage to Codecov
24+
if: always()
25+
uses: codecov/codecov-action@v1
26+
with:
27+
token: ${{ secrets.CODECOV_TOKEN }}
28+
file: test-results/coverage.xml
29+
30+
larastan:
31+
runs-on: ubuntu-latest
32+
name: Larastan
33+
steps:
34+
- uses: actions/checkout@v2
35+
- uses: shivammathur/setup-php@v2
36+
with:
37+
php-version: '8.0'
38+
extensions: soap, bcmath, pdo_sqlite, intl
39+
- uses: ramsey/composer-install@v1
40+
with:
41+
composer-options: "--prefer-dist --optimize-autoloader --ignore-platform-reqs"
42+
- name: Run Larastan
43+
run: vendor/bin/phpstan analyse --no-progress
44+
45+
# phpcs:
46+
# runs-on: ubuntu-latest
47+
# name: PHP Style Fixer
48+
# steps:
49+
# - uses: actions/checkout@v2
50+
# - uses: shivammathur/setup-php@v2
51+
# with:
52+
# php-version: '7.4'
53+
# extensions: soap, bcmath, pdo_sqlite
54+
# - name: Get Composer Cache Directory
55+
# id: composer-cache
56+
# run: echo "::set-output name=dir::$(composer config cache-files-dir)"
57+
# - uses: actions/cache@v2
58+
# with:
59+
# path: ${{ steps.composer-cache.outputs.dir }}
60+
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
61+
# restore-keys: ${{ runner.os }}-composer-
62+
# - name: Install Composer dependencies
63+
# run: composer install --no-interaction --no-progress --prefer-dist --optimize-autoloader --ignore-platform-reqs
64+
# - name: Run PHP-CS-Fixer
65+
# run: vendor/bin/php-cs-fixer fix --dry-run --diff --allow-risky=yes

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ on:
55
types: [ published ]
66

77
jobs:
8-
build:
8+
release:
9+
name: Create NPM release
910
runs-on: ubuntu-latest
1011

1112
steps:

0 commit comments

Comments
 (0)