mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Fix CI
This commit is contained in:
12
.github/workflows/phan.yml
vendored
12
.github/workflows/phan.yml
vendored
@@ -34,12 +34,23 @@ jobs:
|
||||
|| github.event.schedule == false
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
# Another method to get the list of changed files
|
||||
# It sets the variable steps.changed-php.outputs.all_changed_files for other steps
|
||||
- name: Get all changed php files (if PR)
|
||||
id: changed-php
|
||||
if: env.gh_event == 'pull_request'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: ./.github/scripts/get_changed_php.sh
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.2
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phan
|
||||
|
||||
- name: Get changed PHP files
|
||||
id: files
|
||||
run: |
|
||||
@@ -47,6 +58,7 @@ jobs:
|
||||
FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep '\.php$' || true)
|
||||
PHP_FILES=$(echo "$FILES" | grep '\.php$' || true)
|
||||
echo "$PHP_FILES" > /tmp/phan-files.txt
|
||||
|
||||
- name: Run Phan analysis
|
||||
if: steps.files.outputs.files != ''
|
||||
run: |
|
||||
|
||||
6
.github/workflows/pre-commit.yml
vendored
6
.github/workflows/pre-commit.yml
vendored
@@ -109,15 +109,15 @@ jobs:
|
||||
tools: phpcs
|
||||
|
||||
# Install perltidy and perlcritic
|
||||
- name: Install perltidy and perlcritic
|
||||
run: sudo apt-get update && sudo apt-get install -y perltidy libperl-critic-perl
|
||||
#- name: Install perltidy and perlcritic
|
||||
# run: sudo apt-get update && sudo apt-get install -y perltidy libperl-critic-perl
|
||||
|
||||
# Run all the precommit tools (defined into pre-commit-config.yaml).
|
||||
# We can force exclusion of some of them here.
|
||||
- name: Run pre-commit hooks
|
||||
env:
|
||||
# SKIP is used by pre-commit to not execute certain hooks
|
||||
SKIP: no-commit-to-branch,php-cs,php-cbf,trailing-whitespace,end-of-file-fixer
|
||||
SKIP: no-commit-to-branch,php-cs,php-cbf,trailing-whitespace,end-of-file-fixer,shellcheck
|
||||
run: |
|
||||
set -o pipefail
|
||||
pre-commit gc
|
||||
|
||||
Reference in New Issue
Block a user