Skip to content

Commit 95db30e

Browse files
committed
Enhancement: Run phpunit/phpunit on GitHub Actions
1 parent 38d4e07 commit 95db30e

File tree

6 files changed

+97717
-0
lines changed

6 files changed

+97717
-0
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,9 @@ root = true
22

33
[*]
44
insert_final_newline = true
5+
6+
[*.yaml]
7+
charset = utf-8
8+
indent_size = 2
9+
indent_style = space
10+
trim_trailing_whitespace = true

.github/workflows/integrate.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# https://docs.github.com/en/actions
2+
3+
name: "Integrate"
4+
5+
on:
6+
pull_request: null
7+
push:
8+
branches:
9+
- "master"
10+
11+
jobs:
12+
tests:
13+
name: "Tests"
14+
15+
runs-on: "ubuntu-latest"
16+
17+
strategy:
18+
matrix:
19+
php-version:
20+
- "7.4"
21+
22+
steps:
23+
- name: "Checkout"
24+
uses: "actions/checkout@v3"
25+
26+
- name: "Set up PHP"
27+
uses: "shivammathur/setup-php@v2"
28+
with:
29+
coverage: "none"
30+
extensions: "none, dom, json, mbstring, tokenizer, xml, xmlwriter"
31+
php-version: "${{ matrix.php-version }}"
32+
33+
- name: "Set up problem matchers for PHP"
34+
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""
35+
36+
- name: "Set up problem matchers for phpunit/phpunit"
37+
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\""
38+
39+
- name: "Run phpunit/phpunit"
40+
run: ".phive/phpunit --colors=always --configuration=test/phpunit.xml"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ backend/GeoIP.dat
66
.idea
77
.DS_Store
88
.DS_Store?
9+
.phpunit.result.cache

.phive/phars.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phive xmlns="https://phar.io/phive">
3+
<phar name="phpunit" version="^9.5.20" installed="9.5.20" location="./.phive/phpunit" copy="true"/>
4+
</phive>

0 commit comments

Comments
 (0)