-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into pre-opportunity
- Loading branch information
Showing
2,181 changed files
with
82,374 additions
and
19,503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: 'PHPStan baseline' | ||
|
||
on: | ||
# Every Thursday we want to refresh the baseline | ||
schedule: | ||
- cron: '0 6 * * 4' | ||
|
||
# We want to be able to manually refresh the baseline too | ||
workflow_dispatch: | ||
|
||
workflow_call: | ||
inputs: | ||
gh_event: | ||
required: true | ||
type: string | ||
# Run PHPStan analyse on pull requests | ||
pull_request: | ||
|
||
env: | ||
PHP_VERSION: '8.2' | ||
gh_event: ${{ inputs.gh_event || github.event_name }} | ||
CACHE_KEY_PART: ${{ ( inputs.gh_event == 'pull_request' || github.event_name == 'pull_request' ) && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_name }} | ||
jobs: | ||
phpstan: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ env.PHP_VERSION }} | ||
coverage: none # disable xdebug, pcov | ||
tools: phpstan:2.0, cs2pr | ||
extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap, | ||
mysql, pgsql, sqlite3, ldap, xml, mcrypt | ||
env: | ||
fail-fast: true | ||
# Restore old cache | ||
- name: Restore phpstan cache | ||
id: cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ./.github/tmp | ||
key: phpstan-cache-${{ env.PHP_VERSION }}-${{ env.CACHE_KEY_PART }}-${{ | ||
github.run_id }} | ||
restore-keys: | | ||
phpstan-cache-${{ env.PHP_VERSION }}-${{ env.CACHE_KEY_PART }}- | ||
phpstan-cache-${{ env.PHP_VERSION }}-${{ github.head_ref }}- | ||
phpstan-cache-${{ env.PHP_VERSION }}-${{ github.base_ref }}- | ||
phpstan-cache-${{ env.PHP_VERSION }}- | ||
- uses: ruudk/phpstan-baseline-refresh-create-pr-action@main | ||
with: | ||
github_token: ${{ secrets.PAT_GITHUB_TOKEN }} | ||
phpstan_path: phpstan | ||
configuration_path: phpstan.neon.dist | ||
phpstan_additional_arguments: --memory-limit 7G -a build/phpstan/bootstrap_action.php | ||
baseline_path: build/phpstan/phpstan-baseline.neon | ||
commit_name: Dolibot | ||
commit_email: dolibarr-bot@users.noreply.github.com | ||
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: | | ||
This PR is automatically created to cleanup our baseline. | ||
Since the last refresh of the baseline we have fixed {0} ignored errors. | ||
Keep it up all! :muscle: | ||
There are only {1} ignored errors left :sweat_smile: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.