Skip to content

Commit de29aa2

Browse files
committed
Migrate Travis CI to GitHub Actions
1 parent 078c97b commit de29aa2

File tree

3 files changed

+33
-20
lines changed

3 files changed

+33
-20
lines changed

.github/workflows/phpunit.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# .github/workflows/phpunit.yaml
2+
name: phpunit
3+
4+
on: [push, pull_request]
5+
6+
jobs:
7+
tests:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
php: ['5.6', '7.0', '7.1']
12+
13+
name: PHP ${{ matrix.php }} tests
14+
steps:
15+
- run: echo "This job for ${{ github.ref }} was automatically triggered by a ${{ github.event_name }} event on ${{ runner.os }}."
16+
17+
# Basically git clone
18+
- uses: actions/checkout@v2
19+
20+
# Use PHP of specific version
21+
- uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php }}
24+
coverage: none # disable xdebug, pcov
25+
26+
# If we use two steps like this, we can better see if composer or the test failed
27+
- run: composer install --dev --no-interaction --prefer-source
28+
- run: vendor/phpunit/phpunit/phpunit
29+
- run: echo "This job's status is ${{ job.status }}."

.travis.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@ The `--safe-mode` flag indicates that you want to parse files instead of directl
3737

3838
## Tests
3939

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

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

4444
{
4545
"require-dev": {
4646
"phpbb/translation-validator": "1.5.*"
4747
}
4848
}
4949

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

52-
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).
52+
We use GitHub Actions as a continuous integration server and phpunit for our unit testing.
5353

5454
To run the unit tests locally, use this command:
5555

0 commit comments

Comments
 (0)