Skip to content
This repository was archived by the owner on Dec 19, 2022. It is now read-only.

Commit 3f5b4c4

Browse files
author
Seif Kamal
committed
Add Test workflow
1 parent 8a74487 commit 3f5b4c4

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Test
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
strategy:
6+
matrix:
7+
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4']
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: shivammathur/setup-php@v2
12+
with:
13+
php-version: ${{ matrix.php-versions }}
14+
- name: Get composer cache directory
15+
id: composer-cache
16+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
17+
- name: Cache dependencies
18+
uses: actions/cache@v1
19+
with:
20+
path: ${{ steps.composer-cache.outputs.dir }}
21+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
22+
restore-keys: ${{ runner.os }}-composer-
23+
- name: Install dependencies
24+
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
25+
- name: Run tests
26+
run: composer test

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
![](https://github.com/safe-k/struct-array/workflows/Test/badge.svg)
12
![GitHub license](https://img.shields.io/github/license/safe-k/struct-array)
23

34
# PHP Structured Arrays

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"php": ">=7.0.0"
2222
},
2323
"require-dev": {
24-
"phpunit/phpunit": "^9.1"
24+
"phpunit/phpunit": "^6.0"
2525
},
2626
"autoload": {
2727
"psr-4": {

0 commit comments

Comments
 (0)