Skip to content

Commit 16a9d91

Browse files
authored
Merge pull request #166 from alissn/AddGithubAction
GitHub Action Integration for Test Automation and Composer Updates
2 parents a9729db + 23bfd03 commit 16a9d91

File tree

2 files changed

+39
-4
lines changed

2 files changed

+39
-4
lines changed

.github/workflows/tests.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
tests:
9+
runs-on: ubuntu-22.04
10+
11+
strategy:
12+
fail-fast: true
13+
matrix:
14+
php: [ 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3 ]
15+
16+
name: PHP ${{ matrix.php }}
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php }}
26+
ini-values: error_reporting=E_ALL
27+
tools: composer:v2
28+
coverage: none
29+
30+
- name: Install dependencies
31+
run: |
32+
composer update --prefer-dist --no-interaction --no-progress
33+
34+
- name: Execute tests
35+
run: vendor/bin/phpunit

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
],
1515
"keywords": ["Laravel","Date","Datetime","Jalali", "Morilog"],
1616
"require": {
17-
"php": "^7.0 | ^7.1 | ^7.2 | ^8.0 | ^8.1",
17+
"php": "^7.0 | ^8.0",
1818
"nesbot/carbon": "^1.21 || ^2.0 || ^3.0",
19-
"beberlei/assert": "3.*"
19+
"beberlei/assert": "^3.0"
2020
},
2121
"require-dev" : {
22-
"phpunit/phpunit": "~4.0"
23-
},
22+
"phpunit/phpunit": ">4.0"
23+
},
2424
"autoload": {
2525
"psr-4": {
2626
"Morilog\\Jalali\\": "src"

0 commit comments

Comments
 (0)