Skip to content

Commit 146f85f

Browse files
Merge pull request #19 from dmalusev/feat/gihub-actions
Feat/gihub actions
2 parents 7c3c3d9 + 9b313ba commit 146f85f

File tree

6 files changed

+172
-110
lines changed

6 files changed

+172
-110
lines changed

.github/workflows/test.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: "Run Tests"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
env:
12+
XDEBUG_MODE: "coverage"
13+
GITHUB_WORKSPACE: /var/www/html
14+
15+
jobs:
16+
testing:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
operating-system: ['ubuntu-latest']
21+
php-versions: ['8.1', '8.2', '8.3']
22+
phpts: [true, false]
23+
env:
24+
extensions: mbstring, intl, sodium, xsl, zip, pdo, pdo_sqlite, xdebug, curl, igbinary, msgpack
25+
key: extensions-cache
26+
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
31+
- name: Cache Vendor
32+
uses: actions/cache@v3
33+
with:
34+
path: vendor
35+
key: ${{ runner.os }}-vendor-${{ hashFiles('**/composer.lock') }}
36+
37+
- name: Setup cache environment
38+
id: extcache
39+
uses: shivammathur/cache-extensions@v1
40+
with:
41+
php-version: ${{ matrix.php-versions }}
42+
extensions: ${{ env.extensions }}
43+
key: ${{ env.key }}
44+
45+
- name: Cache extensions
46+
uses: actions/cache@v3
47+
with:
48+
path: ${{ steps.extcache.outputs.dir }}
49+
key: ${{ steps.extcache.outputs.key }}-${{ env.phpts }}
50+
restore-keys: ${{ steps.extcache.outputs.key }}-${{ env.phpts }}
51+
52+
- name: Setup PHP
53+
id: setup-php
54+
uses: shivammathur/setup-php@v2
55+
with:
56+
php-version: ${{ matrix.php-versions }}
57+
phpts: ${{ matrix.phpts }}
58+
extensions: ${{ env.extensions }}
59+
tools: php-cs-fixer, phpcs, composer
60+
update: true
61+
coverage: xdebug
62+
63+
- name: Composer install
64+
run: composer install -q --no-ansi --prefer-dist --no-interaction --no-progress
65+
66+
- name: Run Tests
67+
run: vendor/bin/pest --coverage-clover=coverage.xml --coverage --colors=always --fail-on-risky --fail-on-warning --fail-on-deprecation --strict-coverage
68+
69+
- uses: codecov/[email protected]
70+
with:
71+
file: ./coverage.xml
72+
token: ${{ secrets.CODECOV_TOKEN }}
73+
slug: dmalusev/laravel-crypto
74+
name: laravel-crypto
75+
fail_ci_if_error: false

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
vendor/
22
.idea/
3-
.phpbench/
3+
.phpbench/
4+
coverage.xml
5+
teamcity.txt
6+
junit.xml

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
"illuminate/support": "^8|^9|^10"
3535
},
3636
"require-dev": {
37-
"nunomaduro/collision": "^7.10",
37+
"brianium/paratest": "^7.3",
3838
"orchestra/testbench": "^8.21",
3939
"pestphp/pest": "^2.34",
4040
"pestphp/pest-plugin-laravel": "^2.3",
41-
"phpbench/phpbench": "@dev"
41+
"phpbench/phpbench": "^1.2"
4242
},
4343
"autoload": {
4444
"psr-4": {

0 commit comments

Comments
 (0)