Skip to content

Commit

Permalink
chore(ci): Update Github workflows from templates
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Nov 6, 2023
1 parent 69c95b7 commit 7d73ae3
Show file tree
Hide file tree
Showing 18 changed files with 293 additions and 340 deletions.
51 changes: 29 additions & 22 deletions .github/workflows/app-upgrade-mysql.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
name: app upgrade mysql

on:
pull_request:
paths:
#- '.github/workflows/**'
#- 'appinfo/**'
#- 'lib/**'
#- 'templates/**'
#- 'tests/**'
#- 'vendor/**'
#- 'vendor-bin/**'
#- '.php-cs-fixer.dist.php'
#- 'composer.json'
#- 'composer.lock'

merge_group:

push:
branches:
- main
- master
- stable*
on: pull_request

permissions:
contents: read
Expand All @@ -30,9 +10,36 @@ concurrency:
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest

outputs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- 'appinfo/**'
- 'lib/**'
- 'templates/**'
- 'tests/**'
- 'vendor/**'
- 'vendor-bin/**'
- '.php-cs-fixer.dist.php'
- 'composer.json'
- 'composer.lock'
app-upgrade-mysql:
runs-on: ubuntu-latest

needs: changes
if: needs.changes.outputs.src != 'false'

strategy:
matrix:
php-versions: ['8.2']
Expand Down Expand Up @@ -152,4 +159,4 @@ jobs:

steps:
- name: Summary status
run: if ${{ needs.app-upgrade-mysql.result != 'success' }}; then exit 1; fi
run: if ${{ needs.changes.outputs.src != 'false' && needs.app-upgrade-mysql.result != 'success' }}; then exit 1; fi
51 changes: 29 additions & 22 deletions .github/workflows/app-upgrade-postgres.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
name: app upgrade pgsql

on:
pull_request:
paths:
#- '.github/workflows/**'
#- 'appinfo/**'
#- 'lib/**'
#- 'templates/**'
#- 'tests/**'
#- 'vendor/**'
#- 'vendor-bin/**'
#- '.php-cs-fixer.dist.php'
#- 'composer.json'
#- 'composer.lock'

merge_group:

push:
branches:
- main
- master
- stable*
on: pull_request

permissions:
contents: read
Expand All @@ -30,9 +10,36 @@ concurrency:
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest

outputs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- 'appinfo/**'
- 'lib/**'
- 'templates/**'
- 'tests/**'
- 'vendor/**'
- 'vendor-bin/**'
- '.php-cs-fixer.dist.php'
- 'composer.json'
- 'composer.lock'
app-upgrade-pgsql:
runs-on: ubuntu-latest

needs: changes
if: needs.changes.outputs.src != 'false'

strategy:
matrix:
php-versions: ['8.2']
Expand Down Expand Up @@ -148,4 +155,4 @@ jobs:

steps:
- name: Summary status
run: if ${{ needs.app-upgrade-pgsql.result != 'success' }}; then exit 1; fi
run: if ${{ needs.changes.outputs.src != 'false' && needs.app-upgrade-pgsql.result != 'success' }}; then exit 1; fi
50 changes: 29 additions & 21 deletions .github/workflows/behat-sqlite-encryption.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
name: Behat

on:
pull_request:
paths:
#- '.github/workflows/**'
#- 'appinfo/**'
#- 'lib/**'
#- 'templates/**'
#- 'tests/**'
#- 'vendor/**'
#- 'vendor-bin/**'
#- '.php-cs-fixer.dist.php'
#- 'composer.json'
#- 'composer.lock'

merge_group:
push:
branches:
- main
- master
- stable*
on: pull_request

permissions:
contents: read
Expand All @@ -33,9 +14,36 @@ env:
BEHAT_CONFIG: ./tests/Integration/config/behat.yml

jobs:
changes:
runs-on: ubuntu-latest

outputs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- 'appinfo/**'
- 'lib/**'
- 'templates/**'
- 'tests/**'
- 'vendor/**'
- 'vendor-bin/**'
- '.php-cs-fixer.dist.php'
- 'composer.json'
- 'composer.lock'
behat-sqlite-encryption:
runs-on: ubuntu-latest

needs: changes
if: needs.changes.outputs.src != 'false'

strategy:
matrix:
php-versions: ['8.2']
Expand Down Expand Up @@ -121,4 +129,4 @@ jobs:

steps:
- name: Summary status
run: if ${{ needs.behat-sqlite-encryption.result != 'success' }}; then exit 1; fi
run: if ${{ needs.changes.outputs.src != 'false' && needs.behat-sqlite-encryption.result != 'success' }}; then exit 1; fi
52 changes: 30 additions & 22 deletions .github/workflows/behat-sqlite.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
name: Behat

on:
pull_request:
paths:
#- '.github/workflows/**'
#- 'appinfo/**'
#- 'lib/**'
#- 'templates/**'
#- 'tests/**'
#- 'vendor/**'
#- 'vendor-bin/**'
#- '.php-cs-fixer.dist.php'
#- 'composer.json'
#- 'composer.lock'

merge_group:
push:
branches:
- main
- master
- stable*
on: pull_request

permissions:
contents: read
Expand All @@ -33,9 +14,36 @@ env:
BEHAT_CONFIG: ./tests/Integration/config/behat.yml

jobs:
changes:
runs-on: ubuntu-latest

outputs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- 'appinfo/**'
- 'lib/**'
- 'templates/**'
- 'tests/**'
- 'vendor/**'
- 'vendor-bin/**'
- '.php-cs-fixer.dist.php'
- 'composer.json'
- 'composer.lock'
behat-sqlite:
runs-on: ubuntu-latest

needs: changes
if: needs.changes.outputs.src != 'false'

strategy:
matrix:
php-versions: ['8.2']
Expand Down Expand Up @@ -113,12 +121,12 @@ jobs:
permissions:
contents: none
runs-on: ubuntu-latest
needs: behat-sqlite
needs: [changes, behat-sqlite]

if: always()

name: behat-sqlite-summary

steps:
- name: Summary status
run: if ${{ needs.behat-sqlite.result != 'success' }}; then exit 1; fi
run: if ${{ needs.changes.outputs.src != 'false' && needs.behat-sqlite.result != 'success' }}; then exit 1; fi
70 changes: 41 additions & 29 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,56 @@
name: Cypress

on:
pull_request:
paths:
- '.github/workflows/**'
- 'appinfo/**'
- 'cypress/**'
- 'l10n/**'
- 'lib/**'
- 'src/**'
- 'skeleton/**'
- 'templates/**'
- '.php-cs-fixer.dist.php'
- 'babel.config.js'
- 'composer.json'
- 'composer.lock'
- 'cypress.json'
- 'package.json'
- 'package-lock.json'

merge_group:

push:
branches:
- main
- master
- stable*
on: pull_request

permissions:
contents: read

concurrency:
group: ${{ github.head_ref || github.run_id }}
group: cypress-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
APP_NAME: collectives
CYPRESS_baseUrl: http://localhost:8081/index.php

jobs:
changes:
runs-on: ubuntu-latest

outputs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- 'appinfo/**'
- 'css/**'
- 'lib/**'
- 'skeleton/**'
- 'src/**'
- 'templates/**'
- 'babel.config.js'
- 'composer.json'
- 'composer.lock'
- 'cypress.config.js'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- '**.js'
- '**.ts'
- '**.vue'
init:
runs-on: ubuntu-22.04

needs: changes
if: needs.changes.outputs.src != 'false'

outputs:
nodeVersion: ${{ steps.versions.outputs.nodeVersion }}
npmVersion: ${{ steps.versions.outputs.npmVersion }}
Expand Down Expand Up @@ -126,7 +136,9 @@ jobs:

cypress:
runs-on: ubuntu-22.04
needs: init

needs: [changes, init]
if: needs.changes.outputs.src != 'false'

strategy:
fail-fast: false
Expand Down Expand Up @@ -257,4 +269,4 @@ jobs:

steps:
- name: Summary status
run: if ${{ needs.init.result != 'success' || ( needs.cypress.result != 'success' && needs.cypress.result != 'skipped' ) }}; then exit 1; fi
run: if ${{ needs.changes.outputs.src != 'false' && (needs.init.result != 'success' || ( needs.cypress.result != 'success' && needs.cypress.result != 'skipped' )) }}; then exit 1; fi
Loading

0 comments on commit 7d73ae3

Please sign in to comment.