Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to use github CI #227

Merged
merged 1 commit into from
Jan 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 160 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# https://docs.github.com/en/actions

name: "CI"

on:
pull_request: ~
push:
branches:
- "master"

env:
COMPOSER_ROOT_VERSION: 1.99

jobs:
coding-standards:
name: "Coding Standards"

runs-on: "ubuntu-latest"

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

steps:
- name: "Checkout"
uses: "actions/[email protected]"

- name: "Install PHP"
uses: "shivammathur/[email protected]"
with:
coverage: "none"
extensions: "mbstring"
php-version: "${{ matrix.php-version }}"

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


- name: "Install dependencies with composer"
run: "composer update --no-interaction --no-progress"

static-code-analysis:
name: "Static Code Analysis"

runs-on: "ubuntu-latest"

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

steps:
- name: "Checkout"
uses: "actions/[email protected]"

- name: "Install PHP"
uses: "shivammathur/[email protected]"
with:
coverage: "none"
extensions: "mbstring"
php-version: "${{ matrix.php-version }}"

- name: "Install dependencies with composer"
run: "composer update --no-interaction --no-progress && composer i --working-dir=ci"

- name: "Run vimeo/psalm"
run: "ci/vendor/bin/psalm --threads=4"

tests:
name: "Tests"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "5.3"
- "5.4"
- "5.5"
- "5.6"
- "7.0"
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"

steps:
- name: "Checkout"
uses: "actions/[email protected]"

- name: "Install PHP"
uses: "shivammathur/[email protected]"
with:
coverage: "none"
extensions: "mbstring"
php-version: "${{ matrix.php-version }}"

- name: "Install dependencies with composer"
run: "composer update --no-interaction --no-progress"

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

windows-tests:
name: "Windows tests"

runs-on: "windows-latest"

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

steps:
- name: "Checkout"
uses: "actions/[email protected]"

- name: "Install PHP"
uses: "shivammathur/[email protected]"
with:
coverage: "none"
extensions: "mbstring"
php-version: "${{ matrix.php-version }}"

- name: "Install dependencies with composer"
run: "composer update --no-interaction --no-progress"

- name: "Run unit tests"
run: "vendor/bin/phpunit tests/AssertTest.php"

code-coverage:
name: "Code Coverage"

runs-on: "ubuntu-latest"

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

steps:
- name: "Checkout"
uses: "actions/[email protected]"
- name: "Install PHP"
uses: "shivammathur/[email protected]"
with:
coverage: "pcov"
extensions: "mbstring"
php-version: "${{ matrix.php-version }}"

- name: "Install dependencies with composer"
run: "composer update --no-interaction --no-progress"

- name: "Run unit tests"
run: "vendor/bin/phpunit --coverage-clover=coverage.clover"

- name: "Upload coverage"
run: "wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
vendor/
/composer.lock
.phpunit.result.cache
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

34 changes: 0 additions & 34 deletions appveyor.yml

This file was deleted.

Loading