Commit Graph

20 Commits

Author SHA1 Message Date
MDW
ca36c740e5 "Qual: Add dependencies between workflows
# Qual: Add dependencies between workflows

Run costly workflows only after a few workflows succeed
(pre-commit, phan).
2024-03-22 09:50:42 +01:00
MDW
ec0fd31386 Fix phpstan workflow file (#28741)
* Fix phpstan workflow file

# Fix phpstan workflow file

Line was split in two, joined

* qual: set memory limit to 'unlimited' (-1)

* Remove some stubs to check impact

* Fix: Verify execution time limit

* Remove stub files to reuse cache

* Qual: Rename distribution phpstan.neon to phpstan.neon.dist

# Qual: Rename distribution phpstan.neon to phpstan.neon.dist

This allows the developer to override some settings locally

Also update the .gitignore file with phpstan.neon and some other other
ignores (cache, local log files, temporary edit files).

* Enable debug on phpstan

* Re-enable stubs

* Fix: Change parallel settings to defaults, remove buffer

'buffer' is not a documented parameter, removing it.
Removing some configuration settings as the defaults are higher and
should adapt better to the target machine
2024-03-11 14:04:02 +01:00
MDW
4c442de1a2 Qual: Add phan stub files to phpstan configuration (#28730)
* Qual: Add phan stub files to phpstan configuration

* Provide log as artifact (for debug), improve CACHE_KEY
2024-03-10 02:00:41 +01:00
MDW
a68f6ed0d1 Qual: Improve caching for phpstan (#28180)
# Qual: Improve caching for phpstan

The phpstan step does not seem to always choose the best cache.
This configuration update adds the target branch to the restore
feature.
Maybe it is more selective and better.
2024-02-15 13:55:54 +01:00
MDW
7bb1e57f6c 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.
2024-01-21 18:00:22 +01:00
MDW
19ac1e4b02 Qual: Store phpstan cache only if not loaded or successful run
The PHPStan steps run a long time for the latest runs and I suspect that
this may be because of a bad cache, possibly includeing:
```
Result cache was not saved because of non-ignorable exception: Syntax error, unexpected } on line 378
``` .

This change should only save the cache if the run was successful or if no cache
was loaded.  The possibly preserves a cache that still reduces the run time.

For instance, the following got an empty cache, saved at 2024-01-19T21:28:22.18Z.
- https://github.com/Dolibarr/dolibarr/actions/runs/7589384926
That was an aborted run:
- https://github.com/Dolibarr/dolibarr/actions/runs/7589372703/job/20673878193

So I added `cancelled()` to avoid overwriting valid cache and phpstan cache
will only be written if the outcome was success or if the cache could not
be loaded before.

I also updated the version for the cache action.
2024-01-21 15:05:47 +01:00
dependabot[bot]
2ebcca7d9b Bump actions/setup-node from 3 to 4
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 05:55:59 +00:00
Laurent Destailleur
b20838077b Try to merge the 2 phpstan files 2024-01-14 19:42:54 +01:00
Laurent Destailleur
c7a19a007c Add comment 2024-01-14 18:09:32 +01:00
Frédéric FRANCE
74aa353079 try to run action on push to have always valid cache (#27445) 2024-01-12 17:15:16 +01:00
Frédéric FRANCE
9aa727b420 fix phpstan action (#27388) 2024-01-10 15:41:11 +01:00
Laurent Destailleur
57385d042b Fix phpstan 2024-01-10 15:17:39 +01:00
Laurent Destailleur
f711144428 Try to move tmp dir 2024-01-10 14:52:12 +01:00
Laurent Destailleur
b8e0396303 Reduce need for github action CPU (we have a limited quota) 2024-01-10 14:48:24 +01:00
Frédéric FRANCE
8988d7b47b Update phpstan.yml 2024-01-10 14:06:16 +01:00
Frédéric FRANCE
a725b71ed1 fix phpstan action 2024-01-10 14:02:45 +01:00
Frédéric France
f8a62a401b remove can fail 2024-01-06 21:40:23 +01:00
Frédéric FRANCE
5d68744983 clean ignore 2023-12-20 18:34:02 +01:00
Frédéric FRANCE
5edaa0e704 wip 2023-12-07 21:06:36 +01:00
Frédéric FRANCE
1b6006c168 QUAL phpstan github action 2023-12-07 20:49:43 +01:00