Put everything in same workflow
This commit is contained in:
@@ -1,13 +1,25 @@
|
|||||||
name: Push image to registry
|
name: Test, build and push image to registry
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
phpunit-tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Set up PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: '8.3.0'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install
|
||||||
|
- name: Run PHPUnit tests
|
||||||
|
run: vendor/bin/phpunit --configuration phpunit.xml
|
||||||
build-image:
|
build-image:
|
||||||
needs: phpunit-tests
|
needs: phpunit-tests
|
||||||
|
if: success() && github.ref == 'refs/heads/main'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
name: Launch the PHPunit tests
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
phpunit-tests:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Set up PHP
|
|
||||||
uses: shivammathur/setup-php@v2
|
|
||||||
with:
|
|
||||||
php-version: '8.3.0'
|
|
||||||
- name: Install dependencies
|
|
||||||
run: composer install
|
|
||||||
- name: Run PHPUnit tests
|
|
||||||
run: vendor/bin/phpunit --configuration phpunit.xml
|
|
||||||
Reference in New Issue
Block a user