Skip to content

Commit 23af232

Browse files
janlam7nutama
authored andcommitted
Migrate travis-ci to github action
1 parent b7ce6bd commit 23af232

File tree

3 files changed

+40
-22
lines changed

3 files changed

+40
-22
lines changed

.gitattributes

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.gitattributes export-ignore
2+
.github export-ignore
3+
.gitignore export-ignore
4+
/test export-ignore
5+
/phpunit.xml.dist export-ignore

.github/workflows/main.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
php-versions: ['7.3', '7.4']
16+
name: PHP ${{ matrix.php-versions }}
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php-versions }}
22+
- name: Get composer cache directory
23+
id: composer-cache
24+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
25+
- uses: actions/cache@v2
26+
with:
27+
path: ${{ steps.composer-cache.outputs.dir }}
28+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
29+
restore-keys: ${{ runner.os }}-composer-
30+
- name: composer install
31+
run: composer install --no-progress --prefer-dist --optimize-autoloader
32+
- name: phpunit
33+
run: php vendor/bin/phpunit
34+
- name: phpcs
35+
run: php vendor/bin/phpcs

.travis.yml

-22
This file was deleted.

0 commit comments

Comments
 (0)