Skip to content

Commit

Permalink
add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximBurcev committed Sep 13, 2021
1 parent 2745f04 commit fb38006
Showing 1 changed file with 153 additions and 0 deletions.
153 changes: 153 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: Check code style and tests
'on':
push:
branches:
- master
pull_request:
branches:
- master
jobs:

build_5_6:
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_version: 5.6
version: 2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 5.6

- name: Update packages
run: sudo composer update

- name: PHP version
run: php -v

- name: Run phpcs
run: vendor/bin/phpcs

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

build_7_0:
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_version: 7.0
version: 2
command: update

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.0

- name: Update packages
run: sudo composer update

- name: PHP version
run: php -v

- name: Run phpcs
run: vendor/bin/phpcs

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

build_7_1:
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_version: 7.1
version: 2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.1

- name: Update packages
run: sudo composer update

- name: PHP version
run: php -v

- name: Run phpcs
run: vendor/bin/phpcs

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

build_7_2:
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_version: 7.2
version: 2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.2

- name: Update packages
run: sudo composer update

- name: PHP version
run: php -v

- name: Run phpcs
run: vendor/bin/phpcs

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

build_7_3:
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_version: 7.3
version: 2

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

- name: Update packages
run: sudo composer update

- name: PHP version
run: php -v

- name: Run phpcs
run: vendor/bin/phpcs

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



0 comments on commit fb38006

Please sign in to comment.