From a0efaa6d693e2d6cbecf89aaa058d2470885f40b Mon Sep 17 00:00:00 2001
From: Paul Water
Date: Sat, 4 Feb 2023 10:43:44 +0100
Subject: [PATCH] Use GitHub Actions.
---
.gitattributes | 5 ++--
.github/workflows/unit.yml | 50 ++++++++++++++++++++++++++++++++++++++
.scrutinizer.yml | 8 ------
.travis.yml | 11 ---------
README.md | 5 ++--
5 files changed, 55 insertions(+), 24 deletions(-)
create mode 100644 .github/workflows/unit.yml
delete mode 100644 .scrutinizer.yml
delete mode 100644 .travis.yml
diff --git a/.gitattributes b/.gitattributes
index e76370b..24eb55f 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,8 +1,7 @@
/.gitattributes export-ignore
+/.github/ export-ignore
/.gitignore export-ignore
-/.scrutinizer.yml export-ignore
-/.travis.yml export-ignore
+/README.md export-ignore
/build.xml export-ignore
/phpunit.xml export-ignore
-/README.md export-ignore
/test/ export-ignore
diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml
new file mode 100644
index 0000000..c1dcd0e
--- /dev/null
+++ b/.github/workflows/unit.yml
@@ -0,0 +1,50 @@
+on:
+ - "pull_request"
+ - "push"
+
+name: "unit"
+
+permissions:
+ contents: "read"
+
+jobs:
+ tests:
+ name: "Tests"
+ runs-on: "ubuntu-latest"
+
+ strategy:
+ fail-fast: false
+ matrix:
+ php-version:
+ - "8.1"
+ - "8.2"
+ - "8.3"
+
+ steps:
+ - name: "Checkout"
+ uses: "actions/checkout@v3"
+
+ - name: "Install PHP with extensions"
+ uses: "shivammathur/setup-php@v2"
+ with:
+ php-version: "${{ matrix.php-version }}"
+ extensions: "xdebug"
+
+ - name: "Cache dependencies installed with Composer"
+ uses: "actions/cache@v2"
+ with:
+ path: "~/.composer/cache"
+ key: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}"
+ restore-keys: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
+
+ - name: "Install dependencies with Composer"
+ run: "composer update --no-ansi --no-interaction --no-progress"
+
+ - name: "Run tests with PHPUnit"
+ run: "bin/phing unit"
+
+ - name: "Upload to Codecov"
+ uses: "codecov/codecov-action@v2"
+ with:
+ files: "test/coverage.xml"
+ verbose: true
diff --git a/.scrutinizer.yml b/.scrutinizer.yml
deleted file mode 100644
index d5042c3..0000000
--- a/.scrutinizer.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-build:
- tests:
- override:
- - command: './bin/phing unit'
- coverage:
- file: 'test/coverage.xml'
- format: 'php-clover'
-
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 33d0209..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-language: php
-php:
- - '7.3'
- - '7.4'
-
-install:
- - composer self-update
- - composer install
-
-script:
- - ./bin/phing unit
diff --git a/README.md b/README.md
index 8d1479b..48ec36c 100644
--- a/README.md
+++ b/README.md
@@ -21,8 +21,9 @@
|
-
-
+ |
+
+
|
|