Skip to content

Commit

Permalink
ci: configure GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ludovicm67 committed Jan 17, 2021
1 parent fa63f39 commit b9b1726
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@ indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.yaml]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
34 changes: 34 additions & 0 deletions .github/workflows/php7-3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "[PHP 7.3] Run tests"

on:
- push
- pull_request

jobs:
tests:
runs-on: ubuntu-latest

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.3"
tools: composer

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

- name: Install dependencies
run: composer install --prefer-dist

- name: Run tests
run: ./vendor/bin/phpunit

- name: Coveralls
run: ./vendor/bin/php-coveralls -v
env:
COVERALLS_RUN_LOCALLY: 1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/php7-4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "[PHP 7.4] Run tests"

on:
- push
- pull_request

jobs:
tests:
runs-on: ubuntu-latest

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
tools: composer

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

- name: Install dependencies
run: composer install --prefer-dist

- name: Run tests
run: ./vendor/bin/phpunit
28 changes: 28 additions & 0 deletions .github/workflows/php8-0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "[PHP 8.0] Run tests"

on:
- push
- pull_request

jobs:
tests:
runs-on: ubuntu-latest

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.0"
tools: composer

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

- name: Install dependencies
run: composer install --prefer-dist

- name: Run tests
run: ./vendor/bin/phpunit

0 comments on commit b9b1726

Please sign in to comment.