Skip to content

Commit

Permalink
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
eldy committed Nov 14, 2024
2 parents 74d3d54 + ed6bf37 commit 1634bf6
Show file tree
Hide file tree
Showing 227 changed files with 4,454 additions and 1,391 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci-on-pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "CI-PULL-REQUEST"

on: [pull_request]
jobs:
pre-commit:
uses: ./.github/workflows/pre-commit.yml
secrets: inherit
with:
gh_event: ${{ github.event_name }}
phan:
uses: ./.github/workflows/phan.yml
secrets: inherit
needs: [pre-commit]
with:
gh_event: ${{ github.event_name }}
phpstan:
uses: ./.github/workflows/phpstan.yml
secrets: inherit
needs: [pre-commit]
with:
gh_event: ${{ github.event_name }}
#windows-ci:
# needs: [pre-commit, phan, phpstan]
# secrets: inherit
# uses: ./.github/workflows/windows-ci.yml
# with:
# gh_event: ${{ github.event_name }}
gh-travis: # Runs travis script on github runner (not on travis)
if: false
# needs: [pre-commit, phan]
# needs: [windows-ci]
secrets: inherit
needs: [pre-commit, phan, phpstan]
uses: ./.github/workflows/gh-travis.yml
with:
gh_event: ${{ github.event_name }}

# Note (not tested, from https://github.com/orgs/community/discussions/38361)
# To cancel jobs if one fails, the following action may help
# - if: "failure()"
# uses: "andymckay/cancel-action@0.3"
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml → .github/workflows/ci-on-push.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "CI"
name: "CI-PUSH"

on: [push, pull_request]
on: [push]
jobs:
pre-commit:
uses: ./.github/workflows/pre-commit.yml
Expand All @@ -20,7 +20,7 @@ jobs:
with:
gh_event: ${{ github.event_name }}
windows-ci:
needs: [pre-commit, phpstan, phan]
needs: [pre-commit, phan, phpstan]
secrets: inherit
uses: ./.github/workflows/windows-ci.yml
with:
Expand All @@ -30,11 +30,11 @@ jobs:
# needs: [pre-commit, phan]
# needs: [windows-ci]
secrets: inherit
needs: [pre-commit, phan, phpstan]
uses: ./.github/workflows/gh-travis.yml
with:
gh_event: ${{ github.event_name }}


# Note (not tested, from https://github.com/orgs/community/discussions/38361)
# To cancel jobs if one fails, the following action may help
# - if: "failure()"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gh-travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
name: Travis
# Controls when the workflow will run
on:
# push:
# pull_request:
# workflow called by the parent workflow ci.yml
workflow_call:
inputs:
gh_event:
required: true
type: string
# can run job manually
workflow_dispatch:

concurrency:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/phan.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
---
on:
# pull_request:
# push:
# schedule:
# # execute once a day, the 1st
# - cron: 10 9 * * *
# workflow called by the parent workflow ci.yml
workflow_call:
inputs:
gh_event:
required: true
type: string
# can run job manually
workflow_dispatch:

concurrency:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@
name: PHPStan
# Controls when the workflow will run
on:
# push:
# pull_request:
# workflow called by the parent workflow ci.yml
workflow_call:
inputs:
gh_event:
required: true
type: string
# can run job manually
workflow_dispatch:

concurrency:
group: stan-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
}}
group: stan-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
gh_event: ${{ inputs.gh_event || github.event_name }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/phpstan_baseline.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: 'PHPStan'
name: 'PHPStan baseline'

on:
# Every Monday we want to refresh the baseline
# Every Thursday we want to refresh the baseline
schedule:
- cron: '0 6 * * 1'
- cron: '0 6 * * 4'

# We want to be able to manually refresh the baseline too
workflow_dispatch:
Expand Down Expand Up @@ -61,6 +61,7 @@ jobs:
commit_message: PHPStan > Update baseline
target_branch: develop
pr_create: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 1 || 0 }}
# pr_create: 1
pr_title: PHPStan > Update baseline
pr_reviewer: eldy
pr_body: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
name: pre-commit
on:
# pull_request:
# push:
# workflow called by the parent workflow ci.yml
workflow_call:
inputs:
gh_event:
required: true
type: string
# can run job manually
workflow_dispatch:

concurrency:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
name: Win CI
# yamllint disable-line rule:truthy
on:
# push:
# pull_request:
# workflow called by the parent workflow ci.yml
workflow_call:
inputs:
gh_event:
required: true
type: string
# can run job manually
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
id: cache
uses: actions/cache/restore@v4
env:
HASH: ${{ hashFiles('htdocs/install/**') }}
HASH: ${{ hashFiles('htdocs/install/**', 'htdocs/filefunc.inc.php') }}
KEY_ROOT: ${{ matrix.os }}-${{ env.ckey }}-${{ matrix.php_version }}
with:
# See https://github.com/actions/cache/issues/1275#issuecomment-1925217178
Expand All @@ -72,7 +72,7 @@ jobs:
${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ github.head_ref }}-
${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ github.base_ref }}-
${{ env.KEY_ROOT }}-${{ env.HASH }}-
${{ env.KEY_ROOT }}-
# ${{ env.KEY_ROOT }}-
- name: Setup MariaDB
uses: frederic34/setup-mariadb@v1
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ repos:
- id: end-of-file-fixer
# Check that there are no completely merged file conflicts
- id: check-merge-conflict
stages: [commit, pre-rebase, pre-commit, pre-merge-commit]
stages: [pre-rebase, pre-commit, pre-merge-commit]
# Check that files with shebangs have the executable bit set (in git)
- id: check-executables-have-shebangs
# Check that shell files are executables
Expand Down Expand Up @@ -252,7 +252,7 @@ repos:
rev: 3.1.0
hooks:
- id: sqlfluff-lint
stages: [commit, manual] # manual needed for ci
stages: [pre-commit, manual] # manual needed for ci
exclude: (?x)^
(dev/initdemo/mysqldump_.*\.sql
|htdocs/core/menus/init_menu_auguria\.sql
Expand Down
Loading

0 comments on commit 1634bf6

Please sign in to comment.