Skip to content

Commit

Permalink
Enhancement: Run phpunit/phpunit on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Jul 3, 2022
1 parent 38d4e07 commit 95db30e
Show file tree
Hide file tree
Showing 6 changed files with 97,717 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ root = true

[*]
insert_final_newline = true

[*.yaml]
charset = utf-8
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
40 changes: 40 additions & 0 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# https://docs.github.com/en/actions

name: "Integrate"

on:
pull_request: null
push:
branches:
- "master"

jobs:
tests:
name: "Tests"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.4"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "none, dom, json, mbstring, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""

- name: "Set up problem matchers for phpunit/phpunit"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\""

- name: "Run phpunit/phpunit"
run: ".phive/phpunit --colors=always --configuration=test/phpunit.xml"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ backend/GeoIP.dat
.idea
.DS_Store
.DS_Store?
.phpunit.result.cache
4 changes: 4 additions & 0 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpunit" version="^9.5.20" installed="9.5.20" location="./.phive/phpunit" copy="true"/>
</phive>
Loading

0 comments on commit 95db30e

Please sign in to comment.