Skip to content

Commit

Permalink
Merge pull request phpbb#73 from battye/issue/72
Browse files Browse the repository at this point in the history
Migrate Travis CI to GitHub Actions
  • Loading branch information
Crizz0 authored Dec 9, 2021
2 parents cff143b + 69718cb commit 753b51f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 20 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/phpunit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# .github/workflows/phpunit.yaml
name: phpunit

on: [push, pull_request]

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.0', '7.1', '7.2', '7.3', '7.4']

name: PHP ${{ matrix.php }} tests
steps:
- run: echo "This job for ${{ github.ref }} was automatically triggered by a ${{ github.event_name }} event on ${{ runner.os }}."

# Basically git clone
- uses: actions/checkout@v2

# Use PHP of specific version
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none # disable xdebug, pcov

# If we use two steps like this, we can better see if composer or the test failed
- run: composer install --dev --no-interaction --prefer-source
- run: vendor/phpunit/phpunit/phpunit
- run: echo "This job's status is ${{ job.status }}."
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ If you are missing the English language files for the official Viglink extension

## Tests

[![Build Status](https://travis-ci.org/phpbb/phpbb-translation-validator.png?branch=master)](https://travis-ci.org/phpbb/phpbb-translation-validator)
![GitHub Actions CI](https://github.com/phpbb/phpbb-translation-validator/actions/workflows/phpunit.yaml/badge.svg?branch=master)

Add the TranslationValidator as a dependency:
In your project you can add phpBB Translation Validator as a dependency:

{
"require-dev": {
"phpbb/translation-validator": "1.5.*"
}
}

Then add a `php vendor/bin/translation.php` call to your `.travis.yml` file.
Then add a `php vendor/bin/translation.php` call to your workflow.

We use Travis-CI as a continuous integration server and phpunit for our unit testing. See more information on the [phpBB development wiki](https://wiki.phpbb.com/Unit_Tests).
We use GitHub Actions as a continuous integration server and phpunit for our unit testing.

To run the unit tests locally, use this command:

Expand Down

0 comments on commit 753b51f

Please sign in to comment.