Skip to content

Commit 6dfd8fc

Browse files
authored
Merge pull request #8 from Moxio/gh-actions
Replace Travis CI config by GitHub Actions
2 parents c7a0c5e + 2e16800 commit 6dfd8fc

File tree

4 files changed

+1857
-11
lines changed

4 files changed

+1857
-11
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Continuous Integration
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
php-version: [ '7.3', '7.4' ]
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v2
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php-version }}
26+
27+
- name: Validate composer.json and composer.lock
28+
run: composer validate
29+
30+
- name: Cache Composer packages
31+
id: composer-cache
32+
uses: actions/cache@v2
33+
with:
34+
path: vendor
35+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
36+
restore-keys: |
37+
${{ runner.os }}-php-
38+
- name: Install dependencies
39+
if: steps.composer-cache.outputs.cache-hit != 'true'
40+
run: composer install --prefer-dist --no-progress --no-suggest
41+
42+
- name: Run test suite
43+
run: php vendor/bin/phpunit

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/Moxio/php-codesniffer-sniffs.svg?branch=master)](https://travis-ci.org/Moxio/php-codesniffer-sniffs)
1+
![Continuous Integration](https://github.com/Moxio/php-codesniffer-sniffs/workflows/Continuous%20Integration/badge.svg)
22
[![Latest Stable Version](https://poser.pugx.org/moxio/php-codesniffer-sniffs/v/stable)](https://packagist.org/packages/moxio/php-codesniffer-sniffs)
33

44
Moxio PHP_CodeSniffer sniffs

0 commit comments

Comments
 (0)