Skip to content

Commit ae942fd

Browse files
authored
Create run-tests.yml for Github Actions (php-debugbar#461)
* Create run-tests.yml * Update FileStorageTest.php
1 parent 9544e0b commit ae942fd

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

.github/workflows/run-tests.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- "*"
10+
schedule:
11+
- cron: '0 0 * * *'
12+
13+
jobs:
14+
php-tests:
15+
runs-on: ubuntu-20.04
16+
timeout-minutes: 15
17+
env:
18+
COMPOSER_NO_INTERACTION: 1
19+
20+
strategy:
21+
matrix:
22+
php: [8.0, 7.4, 7.3, 7.2, 7.1]
23+
24+
name: PHP${{ matrix.php }}
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v2
29+
30+
- name: Setup PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: ${{ matrix.php }}
34+
coverage: none
35+
extensions: pdo_sqlite
36+
37+
- name: Install dependencies
38+
run: composer update --prefer-dist --no-progress
39+
40+
- name: Execute Unit Tests
41+
run: vendor/bin/phpunit

tests/DebugBar/Tests/Storage/FileStorageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ public function testFind()
3939
public function testClear()
4040
{
4141
$this->s->clear();
42-
$this->assertFileDoesNotExist($this->dirname . '/foo.json');
42+
$this->assertFileNotExists($this->dirname . '/foo.json');
4343
}
4444
}

0 commit comments

Comments
 (0)