Skip to content

Commit

Permalink
Use GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
prwater committed Feb 4, 2023
1 parent 8977400 commit a0efaa6
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 24 deletions.
5 changes: 2 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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
50 changes: 50 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 0 additions & 8 deletions .scrutinizer.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
<td>
<a href="https://packagist.org/packages/plaisio/helper-password"><img src="https://poser.pugx.org/plaisio/helper-password/v/stable" alt="Latest Stable Version"/></a>
</td>
<td><a href="https://travis-ci.org/PhpPlaisio/helper-password"><img src="https://travis-ci.org/PhpPlaisio/helper-password.svg?branch=master" alt="Build Status"/></a><br/>
<a href="https://scrutinizer-ci.com/g/PhpPlaisio/helper-password/?branch=master"><img src="https://scrutinizer-ci.com/g/PhpPlaisio/helper-password/badges/coverage.png?b=master" alt="Code Coverage"/></a><br/>
<td>
<a href="https://github.com/PhpPlaisio/helper-password/actions/workflows/unit.yml"><img src="https://github.com/PhpPlaisio/helper-password/actions/workflows/unit.yml/badge.svg" alt="Build Status"/></a><br/>
<a href="https://codecov.io/gh/PhpPlaisio/helper-password"><img src="https://codecov.io/gh/PhpPlaisio/helper-password/branch/master/graph/badge.svg" alt="Code Coverage"/></a>
</td>
<td>
<a href="https://scrutinizer-ci.com/g/PhpPlaisio/helper-password/?branch=master"><img src="https://scrutinizer-ci.com/g/PhpPlaisio/helper-password/badges/quality-score.png?b=master" alt="Scrutinizer Code Quality"/></a>
Expand Down

0 comments on commit a0efaa6

Please sign in to comment.