mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Qual: Optimize/explain workflows
# Qual: Optimize/explain workflows phpstan checkout took about 1.5 minutes, while pre-commit only takes 10s. So I removed the option to the checkout option which likely makes the difference. I removed the IMHO useless step of installing node - it may have been useful during setting up the workflow, but not now. I commented on the pre-commit workflow.
This commit is contained in:
parent
b128ec6a4b
commit
7bb1e57f6c
7
.github/workflows/phpstan.yml
vendored
7
.github/workflows/phpstan.yml
vendored
|
|
@ -25,8 +25,6 @@ jobs:
|
|||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# Get PHP and addons
|
||||
- name: Setup PHP
|
||||
|
|
@ -36,11 +34,6 @@ jobs:
|
|||
php-version: "${{ matrix.php-version }}"
|
||||
tools: phpstan, cs2pr
|
||||
extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap, mysql, pgsql, sqlite3, ldap, xml, mcrypt
|
||||
# ???
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 14.x
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
# Restore old cache
|
||||
- name: Restore phpstan cache
|
||||
|
|
|
|||
6
.github/workflows/pre-commit.yml
vendored
6
.github/workflows/pre-commit.yml
vendored
|
|
@ -16,7 +16,8 @@ jobs:
|
|||
if: false
|
||||
# Checkout git sources to analyze
|
||||
- uses: actions/checkout@v4
|
||||
# ???
|
||||
# Action setup-python needs a requirements.txt or pyproject.toml
|
||||
# This ensures one of them exists.
|
||||
- name: Create requirements.txt if no requirements.txt or pyproject.toml
|
||||
run: |-
|
||||
[ -r requirements.txt ] || [ -r pyproject.toml ] || touch requirements.txt
|
||||
|
|
@ -31,7 +32,8 @@ jobs:
|
|||
with:
|
||||
path: ~/.cache/pre-commit/
|
||||
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
# Run all the precommit tools (defined into pre-commit-config.yaml). We can force exclusion of some of them here.
|
||||
# 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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user