Skip to content

Commit

Permalink
Replace Travis CI with GitHub Actions
Browse files Browse the repository at this point in the history
 # Conflicts:
 #	.travis.yml
  • Loading branch information
robbieaverill committed Mar 1, 2022
1 parent be6295e commit 9aefe28
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 17 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Tests and linting

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run linting
run: composer run-script lint

- name: Run tests
run: composer run-script test
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,9 @@
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"scripts": {
"lint": "vendor/bin/phpcs --standard=PSR12 src/",
"test": "vendor/bin/phpspec run -f pretty"
}
}

0 comments on commit 9aefe28

Please sign in to comment.