Commit Graph

28 Commits

Author SHA1 Message Date
Darko Gjorgjijoski
c04b84e5b5 ci(docker): release-driven tags, drop nightly cron, add 3.x pre-release channel
Remove the scheduled nightly/alpha builds; gate :latest on a single LATEST_MAJOR; publish :beta/:next for pre-releases; keep a transitional :nightly alias on stable. Also fix the production Dockerfile so a stale host public/build can no longer clobber the freshly built frontend (reorder COPY, ignore public/build).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 23:42:11 +02:00
Darko Gjorgjijoski
8d929ec09d feat(api): generate OpenAPI spec with Scramble for api-docs.invoiceshelf.com (#685)
Auto-generate an OpenAPI 3.1 spec from the v1 API's FormRequests and Resources
(no annotations) for publishing at api-docs.invoiceshelf.com as a static
Swagger UI site.

- config/scramble.php: scope to api/v1, version from version.md, clean
  placeholder server, export to public/openapi.json
- ScrambleServiceProvider: advertise Bearer (Sanctum) auth; add the required
  `company` tenancy header only to routes using the `company` middleware
- OpenApiDocumentationTest: assert spec shape, auth scheme, company-header gating
- .github/workflows/openapi.yml: export + commit spec on release, notify the
  api-docs site to rebuild
- public/openapi.json: generated seed spec (184 paths)
- dedoc/scramble added as a dev-only dependency

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 15:51:54 +02:00
Darko Gjorgjijoski
e48212b18a build: migrate frontend tooling to pnpm (v3) (#678)
* build: migrate frontend tooling to pnpm (v3)

Rebuilds the stale #673 on current 3.x so it doesn't revert #657's test
split, the Node-24 action bumps, or composer-install@4.0.0.

- package.json: packageManager pnpm@11.6.0; drop dead 'resolutions'
- pnpm-workspace.yaml: nodeLinker hoisted, allowBuilds vue-demi,
  overrides brace-expansion (replaces resolutions)
- pnpm-lock.yaml generated via 'pnpm import' from yarn.lock (keeps the
  resolved versions, incl. vite 8.0.3 / rolldown rc.12); yarn.lock removed
- docker.yaml + release.yaml: pnpm/action-setup@v6 + cache pnpm + pnpm
  install/build (action versions and the #657 split left intact; check.yaml
  needs no change — its test job is PHP-only after #657)
- 3 Dockerfiles: node:24 + corepack + pnpm install --frozen-lockfile && pnpm build
- Makefile, composer 'dev' script, CLAUDE.md, .gitignore -> pnpm

* fix(deps): pin vite to 8.0.5 (security)

Now that 3.x is the default branch, Dependabot flags vite <8.0.5. Pin to
8.0.5 (the patched version), which keeps rolldown 1.0.0-rc.12 — still
below 8.0.15 where the broken rolldown 1.0.3 (the init_runtime_dom_esm_bundler
chunk regression) starts, so the build stays clean. Mirrors v2's #674.
2026-06-12 14:04:16 +02:00
Darko Gjorgjijoski
4ab62b98c6 ci: speed up PHP test jobs (disable Xdebug, drop frontend build, run parallel) (#657)
* ci: speed up the test job (disable Xdebug, drop frontend build, run parallel)

The `tests` job in check.yaml carried three sources of wasted wall-clock,
none of which it actually used:

- `coverage: xdebug` loaded Xdebug into every PHP process, but no step ever
  passes `--coverage` — so it was pure tax (~2-3x slower execution). Switch
  to `coverage: none`. If coverage is wanted later, use pcov + `--coverage`.
- The job ran `npm install` + `npm run build` before the PHP tests. The
  feature suite is API/JSON only (49/56 feature files use getJson/assertJson)
  and nothing renders the Vite blade, so the built assets are never needed.
  Drop the Node/Vite steps; release & docker workflows still build assets.
- Tests ran single-process. brianium/paratest is already installed and the
  runner has 4 cores, so run `php artisan test --parallel`.

Validated locally: full suite passes in parallel (exit 0), including
repeated runs of the two filesystem-writing module tests — no races.

docker.yaml carries the same pattern but only runs on release/nightly cron,
so it is left for a follow-up.

* ci: apply the same test-job speedups to docker.yaml

The release/nightly `tests` job in docker.yaml carried the identical waste
that check.yaml had: Xdebug loaded but never used for coverage, an
unnecessary frontend build before the PHP tests, and serial execution.

Mirror the check.yaml fix: coverage: none, drop the Node/Vite steps
(the suite is API/JSON and the separate release_artifact_build job builds
its own assets), and run php artisan test --parallel.

* ci: run module-scaffolding tests serially under --parallel

The Modules/* tests (module:make ScaffoldProbe + modules_statuses.json
toggles) mutate shared on-disk module state. paratest isolates the DB
per worker but NOT the filesystem, so concurrent workers boot with
ScaffoldProbe enabled and fatal on the un-autoloaded ServiceProvider
(31 failures). Tag them 'modules' (Pest group on Feature/Company/Modules)
and split CI: parallel --exclude-group=modules, then serial --group=modules.

* ci: stub Vite in tests + bump all actions to Node 24 versions

Part A (fixes #657): the customer-portal entrypoint test renders the SPA
shell (app.blade.php → @vite). With the frontend build dropped from CI
there's no manifest, so it 500'd (ViteManifestNotFoundException). Call
$this->withoutVite() in TestCase::setUp() so SPA-shell renders work
without a built manifest; the build stays dropped.

Part B: bump every Node-20 action to its node24 release — checkout v4->v6,
setup-node v4->v6, paths-filter v3->v4, cancel-workflow-action 0.12.1->0.13.1,
softprops/action-gh-release v2->v3, docker/{setup-buildx v3->v4, login v3->v4,
metadata v5->v6, build-push v5->v7}. setup-php@v2, ramsey/composer-install@v2
(composite) and svenstaro/upload-release-action@v2 are already node24.

* ci: bump ramsey/composer-install v2 -> 4.0.0 (node24 internal cache)

composer-install@v2 is composite but internally calls actions/cache@v3
(Node 20), which still trips the deprecation. 4.0.0 uses actions/cache
v5.0.3 (Node 24) and keeps the composer-options input we use.
2026-06-12 12:35:10 +02:00
Darko Gjorgjijoski
e64529468c Replace deleted_files with manifest-based updater cleanup, add release workflow
- Add manifest.json generation script (scripts/generate-manifest.php)
- Add Updater::cleanStaleFiles() that removes files not in manifest
- Add /api/v1/update/clean endpoint with backward compatibility
- Add configurable update_protected_paths in config/invoiceshelf.php
- Update frontend to use clean step instead of delete step
- Add GitHub Actions release workflow triggered on version tags
- Add .github/release.yml for auto-generated changelog categories
- Update Makefile to include manifest generation and scripts directory
2026-04-06 19:27:33 +02:00
Darko Gjorgjijoski
08dfe62312 Standardize Node.js version to 24 (#599)
Update Node.js from 20 to 24 across CI workflows, Dockerfiles,
package.json engines field, and add .node-version file for consistent
local development.
2026-04-02 17:08:39 +02:00
Darko Gjorgjijoski
63d3a7fc8e Skip PHP CI jobs when only non-PHP files change
Replace workflow-level paths-ignore with per-job filtering using
dorny/paths-filter. PHP lint and test jobs now only run when PHP-related
files (app/, config/, database/, routes/, tests/, composer.*, phpunit.xml)
are modified.
2026-04-02 16:35:07 +02:00
mchev
d4e19646ee fix(ci): install deps on PHP 8.4 (Symfony 8 requires >=8.4) 2026-03-21 19:03:37 +01:00
Darko Gjorgjijoski
1998d15b25 Fix repository name 2025-08-31 16:18:29 +02:00
Darko Gjorgjijoski
f47b6d51f2 GitHub Actions Tweaks (#457)
* Remove PHP 8.2 from tests

* Fix docker hub repository name

* Improve action labels

* Ignore .github folder from check CI
2025-08-31 16:13:18 +02:00
Darko Gjorgjijoski
23f6b1877f 🚢 Simplified docker builds (#456)
* Simplify docker builds

* Ignore docker and frontend scripts from PHP related checks

* Update docker development setup
2025-08-31 15:07:22 +02:00
mchev
6d14dce668 Improving github workflow (#278)
* Improving workflow, updating dependencies and test pint with PHP 8.3, adding php 8.4 on tests

* Fix cache issue

* Not caching since it is not working
2025-05-04 15:22:43 +02:00
Darko Gjorgjijoski
5d817b5c45 Ignore the translations branch from CI 2024-11-09 15:22:23 +01:00
Darko Gjorgjijoski
01d32d50b5 Exclude crowdin branch from workflows 2024-10-16 00:54:02 +02:00
Darko Gjorgjijoski
3daa767772 Compile the front-end when running unit tests 2024-02-05 00:00:46 +01:00
Darko Gjorgjijoski
a85c682bcb Update workflows 2024-01-30 07:38:00 +02:00
Darko Gjorgjijoski
548f5fa431 Remove uffizzi
This will be revisited later, if we reconsider it it will be separate repository
2024-01-30 07:38:00 +02:00
gdarko
0f75405e6e Update docker version 2024-01-29 15:15:30 +01:00
gdarko
424343c0f4 Update docker build platforms 2024-01-29 08:14:36 -06:00
gdarko
07998a4697 Remove run number from docker versions 2024-01-29 14:56:47 +01:00
gdarko
88f60fce04 Update CI workflow & remove php-cs-fixer config 2024-01-29 04:48:03 -06:00
gdarko
8de34efd8c Update version 2024-01-29 11:37:02 +01:00
gdarko
613d6c2cb2 Refactor CI, Build docker on push 2024-01-29 11:20:11 +01:00
Aramayis
57bdbd2897 feat: front-end files bulding (#1098)
Co-authored-by: Aramayis <>
2022-12-17 18:19:49 +05:30
Aramayis
7447cc24f9 feat: uffizzi integration (#1091)
Co-authored-by: Aramayis <>
2022-11-21 18:35:59 +05:30
Mohit Panjwani
ebad76c8d7 remove extra cs-fixer config file 2021-05-25 13:20:22 +05:30
Mwikala Kangwa
9e98a96d61 Implement PHP CS Fixer and a coding standard to follow (#471)
* Create PHP CS Fixer config and add to CI workflow

* Run php cs fixer on project

* Add newline at end of file

* Update to use PHP CS Fixer v3

* Run v3 config on project

* Run seperate config in CI
2021-05-21 17:27:51 +05:30
Florian Gareis
17c00c322d Add test ci 2021-03-22 16:52:01 +01:00