Skip to content

Commit

Permalink
started porting travis ci to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
arp committed Aug 31, 2020
1 parent d4e0b7d commit e70049e
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/continuous_integration.yml
@@ -0,0 +1,63 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Continuous Integration"

on:
- "pull_request"
- "push"

jobs:

continuous-integration:
name: "Continuous Integration"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"

dependencies:
- "highest"

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

- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v1"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install dependencies with composer"
run: "composer install --no-interaction"

- name: "Run tests with phpunit/phpunit"
run: "vendor/bin/phpunit"

- name: "Run static code analysis with phpstan/phpstan"
run: "composer phpstan"

- name: "Run coding standard checks with squizlabs/php_codesniffer"
run: "composer cs-check"

- name: "Archive code coverage results"
uses: "actions/upload-artifact@v1"
with:
name: "codeCoverage"
path: "build"

- uses: codecov/codecov-action@v1 # upload the coverage to codecov
with:
fail_ci_if_error: true # optional (default = false)
11 changes: 11 additions & 0 deletions .github/workflows/deploy.yml
@@ -0,0 +1,11 @@
#todo: create deploy build

#name: "Deploy"

#on:
create:
tags:
- v.*

#jobs:

0 comments on commit e70049e

Please sign in to comment.