Skip to content

Commit

Permalink
Enhancement: Switch to using GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Nov 6, 2019
1 parent 53e1d07 commit 229e860
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 35 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/continuous-integration.yml
@@ -0,0 +1,65 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

on:
- pull_request
- push

name: "Continuous Integration"

jobs:
continuous-integration:
name: "Continuous Integration"

runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- 7.3

steps:
- name: "Checkout"
uses: actions/checkout@master

- name: "Install PHP with extensions"
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-version }}
extension-csv: "intl, json, pdo, xdebug"
coverage: "xdebug"

- name: "Cache dependencies installed with composer"
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: ${{ matrix.php-version }}-composer-locked-${{ github.sha }}
restore-keys: |
${{ matrix.php-version }}-composer-locked-
- name: "Install dependencies with composer"
run: $(which composer) install

- name: "Copy configuration"
run: cp src/config.php.dist src/config.php

- name: "Lint files with parallel-lint"
run: vendor/bin/parallel-lint --exclude vendor .

- name: "Check code style with phpcs"
run: vendor/bin/phpcs --runtime-set ignore_warnings_on_exit true -p .

- name: "Run a static code analysis with phpstan"
run: vendor/bin/phpstan analyze --configuration=phpstan.neon

- name: "Run dependency analysis with security-checker"
run: vendor/bin/security-checker security:check composer.lock

- name: "Dump Xdebug filter with phpunit"
run: vendor/bin/phpunit --dump-xdebug-filter=build/xdebug-filter.php

- name: "Run tests with phpunit"
run: vendor/bin/phpunit --coverage-clover=build/logs/clover.xml --coverage-text --prepend=build/xdebug-filter.php

- name: "Send code coverage to codecov.io"
run: bash <(curl -s https://codecov.io/bash)

35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

0 comments on commit 229e860

Please sign in to comment.