Github Actions разграничены для веток master и dev
This commit is contained in:
25
.github/workflows/dev.yml
vendored
Normal file
25
.github/workflows/dev.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Dev build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ dev ]
|
||||
pull_request:
|
||||
branches: [ dev ]
|
||||
|
||||
jobs:
|
||||
Tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Validate composer.json and composer.lock
|
||||
uses: php-actions/composer@40-env
|
||||
with:
|
||||
version: 2
|
||||
php_version: 7.4
|
||||
only_args: --prefer-dist --no-progress
|
||||
|
||||
- name: Run phpunit tests
|
||||
uses: php-actions/phpunit@v8
|
||||
with:
|
||||
configuration: ./phpunit.xml
|
||||
25
.github/workflows/master.yml
vendored
Normal file
25
.github/workflows/master.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Master build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
Tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Validate composer.json and composer.lock
|
||||
uses: php-actions/composer@40-env
|
||||
with:
|
||||
version: 2
|
||||
php_version: 7.4
|
||||
only_args: --prefer-dist --no-progress
|
||||
|
||||
- name: Run phpunit tests
|
||||
uses: php-actions/phpunit@v8
|
||||
with:
|
||||
configuration: ./phpunit.xml
|
||||
26
.github/workflows/tests.yml
vendored
26
.github/workflows/tests.yml
vendored
@@ -1,26 +0,0 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Validate composer.json and composer.lock
|
||||
run: composer validate
|
||||
|
||||
- name: Install composer dependencies
|
||||
run: composer install --prefer-dist --no-progress --no-suggest
|
||||
|
||||
- name: Run phpunit tests
|
||||
uses: php-actions/phpunit@v1.0.0
|
||||
with:
|
||||
# Configuration file location
|
||||
config: ./phpunit.xml
|
||||
Reference in New Issue
Block a user