Merge pull request #5664 from nextcloud/feat/workflow-auto-update-phpunit-mysql.yml
Updating phpunit-mysql.yml workflow from template
This commit is contained in:
29
.github/workflows/phpunit-mysql.yml
vendored
29
.github/workflows/phpunit-mysql.yml
vendored
@@ -15,8 +15,22 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
matrix:
|
||||||
|
runs-on: ubuntu-latest-low
|
||||||
|
outputs:
|
||||||
|
matrix: ${{ steps.versions.outputs.sparse-matrix }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout app
|
||||||
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
|
- name: Get version matrix
|
||||||
|
id: versions
|
||||||
|
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
|
||||||
|
with:
|
||||||
|
matrix: '{"mysql-versions": ["8.1"]}'
|
||||||
|
|
||||||
changes:
|
changes:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest-low
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
src: ${{ steps.changes.outputs.src}}
|
src: ${{ steps.changes.outputs.src}}
|
||||||
@@ -42,14 +56,11 @@ jobs:
|
|||||||
phpunit-mysql:
|
phpunit-mysql:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
needs: changes
|
needs: [changes, matrix]
|
||||||
if: needs.changes.outputs.src != 'false'
|
if: needs.changes.outputs.src != 'false'
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
|
||||||
php-versions: ['8.0', '8.1', '8.2', '8.3']
|
|
||||||
server-versions: ['master']
|
|
||||||
mysql-versions: ['8.1']
|
|
||||||
|
|
||||||
name: MySQL ${{ matrix.mysql-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
|
name: MySQL ${{ matrix.mysql-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
|
||||||
|
|
||||||
@@ -60,7 +71,7 @@ jobs:
|
|||||||
- 4444:3306/tcp
|
- 4444:3306/tcp
|
||||||
env:
|
env:
|
||||||
MYSQL_ROOT_PASSWORD: rootpassword
|
MYSQL_ROOT_PASSWORD: rootpassword
|
||||||
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5
|
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 10
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set app env
|
- name: Set app env
|
||||||
@@ -98,7 +109,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Check composer file existence
|
- name: Check composer file existence
|
||||||
id: check_composer
|
id: check_composer
|
||||||
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
|
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
|
||||||
with:
|
with:
|
||||||
files: apps/${{ env.APP_NAME }}/composer.json
|
files: apps/${{ env.APP_NAME }}/composer.json
|
||||||
|
|
||||||
@@ -162,7 +173,7 @@ jobs:
|
|||||||
summary:
|
summary:
|
||||||
permissions:
|
permissions:
|
||||||
contents: none
|
contents: none
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest-low
|
||||||
needs: [changes, phpunit-mysql]
|
needs: [changes, phpunit-mysql]
|
||||||
|
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
Reference in New Issue
Block a user