Commit graph

25 commits

Author SHA1 Message Date
Paulo Castellano
dc30ed3017
Update GitHub funding username (#227) 2026-08-03 13:15:28 -03:00
Cursor Agent
3d5f345033
Upgrade Pest from v4 to v5 (PHPUnit 13).
Bump pestphp/pest, pest-plugin-laravel, and pest-plugin-browser to ^5.0.
pest-plugin-laravel v5 requires Laravel ^13.23, so the framework lock is
updated accordingly. Refresh agent docs/skills for the Pest 5 / PHPUnit 13
baseline.

Co-authored-by: Paulo Castellano <hello@paulocastellano.com>
2026-07-31 01:40:50 +00:00
Paulo Castellano
44127c4890 Remove the Vitest frontend unit-test layer
The project's test strategy is backend + e2e only, so drop the Vitest setup that had been added for the crop math: the imageCrop.test.ts suite, vitest.config.ts, the dependency and test:unit script, the CI step, and the test:all reference. The crop math is exercised through the Pest browser test.
2026-07-04 10:53:08 -03:00
Paulo Castellano
de75ef4703 Bump release-docker actions to Node 24
Move checkout, upload-artifact, and download-artifact to their current majors so the release image build stops relying on the deprecated Node 20 runtime. Docker actions are left as-is (not flagged). Only runs on release tags, so it is not exercised by PR CI.
2026-07-04 10:35:36 -03:00
Paulo Castellano
45d0dbf510 Bump CI actions to Node 24 and shard the e2e job
Move actions/checkout, setup-node, cache, and upload-artifact to their current majors (Node 24 runtime). Run the browser suite as a sharded matrix aggregated by an e2e-gate job, so the required status check stays a stable name as the shard count scales. Vitest runs once (shard 1). Ready for the incoming e2e test expansion.
2026-07-04 10:28:17 -03:00
Paulo Castellano
2d72d74cc8 Split CI into parallel backend and e2e jobs
Extract the shared PHP/Composer/Node/database/Passport setup into a composite action, and run the backend suite (Unit + Feature) and the frontend/e2e suite (Vitest + Playwright browser tests) as two parallel jobs. This isolates the flaky browser suite so it can be rerun on its own, surfaces failures by area, gives the growing e2e suite room to shard, and uploads Playwright artifacts on failure.
2026-07-04 10:14:01 -03:00
Paulo Castellano
ef81ea74a8 Add frontend unit tests and harden the cropper's test coverage
Add Vitest (test:unit) with exact-value tests for the crop math (containScale, defaultSelection, clampSelection, all resizeSelection corners, and mime/filename resolution), and wire it plus the Pest browser test into CI. The browser test now samples output pixels against a four-quadrant fixture, so it detects a blank, flipped, or wrong crop rather than only asserting a 512x512 canvas. Add composer test:all to run PHP + Vitest + browser tests locally.
2026-07-04 09:56:38 -03:00
Paulo Castellano
bcefe66da2 Enrich Copilot review instructions with examples and missing conventions 2026-06-10 14:26:54 -03:00
Paulo Castellano
9c15e43e91 Add Copilot code review instructions 2026-06-10 14:22:16 -03:00
Paulo Castellano
37d8699b1f
Update GitHub funding username 2026-05-27 17:54:16 -03:00
Paulo Castellano
09fa97d539 refactor(docker): align echo.ts with the shared sendkit config
Make resources/js/echo.ts byte-identical to the sendkit Echo setup
(VITE_REVERB_* read directly, no window.location derivation). The release
workflow now bakes only VITE_REVERB_APP_KEY, and compose.prod.yaml restores
the 8080 host port so the published image's Reverb client (baked at
localhost:8080) works for local docker compose. A custom-domain deploy needs
the image rebuilt with VITE_REVERB_HOST/PORT/SCHEME set.
2026-05-27 15:17:47 -03:00
Paulo Castellano
48727c80cd feat(docker): add Caddy reverse proxy and domain-portable Reverb config
Add an optional Caddy service (proxy profile) to compose.prod.yaml for
automatic HTTPS on a custom domain, with a Caddyfile that transparently
proxies WebSocket upgrades.

Move Echo setup into resources/js/echo.ts and derive the Reverb host from
window.location when VITE_REVERB_* is unset, so the published image's frontend
connects on any domain without a rebuild. The release workflow bakes a fixed
public Reverb key and leaves host/port/scheme empty to enable this; the Herd
dev setup keeps its explicit VITE_REVERB_* values, so its behaviour is
unchanged.

Drop the now-unneeded 8080 host port — the WebSocket rides the main HTTP(S)
port via the in-container nginx /app proxy.
2026-05-27 14:53:46 -03:00
Paulo Castellano
5b9226569f feat(docker): publish multi-arch image to GHCR and add self-host compose
Add a release workflow that builds docker/Dockerfile (production target) for
linux/amd64 and linux/arm64 on native runners and publishes a single
multi-arch manifest to ghcr.io/trypostit/trypost on every v*.*.* tag, tagged
with semver (1.2.3, 1.2, 1) and latest.

Add compose.prod.yaml: a self-host stack that pulls the published image
alongside Postgres and Redis with persistent volumes. Config is inline with
sectioned comments, including a commented S3/R2 block (storage already uses
the default disk, so switching is config-only).

No application code is changed.
2026-05-27 14:40:35 -03:00
Paulo Castellano
c26e407815
Update GitHub funding username 2026-05-07 09:24:35 -03:00
Paulo Castellano
7852ad04d5 ci: enable parallel execution for test suite in GitHub Actions workflow 2026-05-06 17:28:41 -03:00
Paulo Castellano
bec831fec6 ci: fix tests workflow and clear pre-existing lint errors
- Add `php artisan passport:keys --force` step to tests workflow
  so the OAuth2 server keys exist before tests run. Without them
  every API test failed with `LogicException: Invalid key supplied`
  from `vendor/league/oauth2-server/src/CryptKey.php`.

- Clear 4 pre-existing unused-variable lint errors that were
  blocking this PR's CI (auth/GoogleAuthButton, billing/Subscribe,
  posts/editor/CommentsTab, posts/editor/TikTokSettings).

- `eslint --fix` also reordered imports alphabetically in 11 other
  files — pure cosmetic.
2026-05-04 12:03:44 -03:00
Paulo Castellano
d48b508ab3 fix: reorder CI steps — env before composer, key after 2026-03-31 12:08:04 -03:00
Paulo Castellano
2691bf172c fix: copy .env.ci before composer install in CI 2026-03-31 12:07:15 -03:00
Paulo Castellano
fb732495b2 feat: adding tests 2026-01-18 22:12:25 -03:00
Paulo Castellano
100e52be54 feat: adding tests.. 2026-01-18 22:01:55 -03:00
Paulo Castellano
69fba7af23 feat: working on ci/cd 2026-01-18 19:02:48 -03:00
Paulo Castellano
d5485a8389 feat: update CI workflow to use PostgreSQL and Redis services, configure test environment, and enhance .env.example with PostgreSQL defaults, Reverb settings, and social platform credentials. 2026-01-18 18:00:09 -03:00
Paulo Castellano
ea67b7f5d1 chore: Update GitHub funding username in funding configuration. 2026-01-18 17:49:53 -03:00
Paulo Castellano
a6517f4b5b feat: Introduce a self-hosted mode, refactor email notifications to use Mailable classes with new templates, and update the project README. 2026-01-18 17:48:12 -03:00
Paulo Castellano
6890147aa6 chore: first commit 2026-01-14 22:13:44 -03:00