1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 16:24:04 +00:00
tenancy/INTERNAL.md
Samuel Štancl a88a42fbbf
[4.x] Add DisallowSqliteAttach feature (#1283)
* queue.yml: remove TENANCY_VERSION env var from test.sh

* add DisallowSqliteAttach feature

* Fix code style (php-cs-fixer)

* ci: add cd to each step

* ci: simpler solution to race conditions, proper os/arch matrix

* ci: fix runs-on matrix

* ci: fix workflow on windows, fix makefile

* Auto-build: Update extensions [skip ci]

* Auto-build: Update extensions [skip ci]

* ci: try fixing retry logic, make makefile use cl on Windows

* ci: use the current branch for rebase

* ci: try calling vcvars64

* ci: misc minor fixes

* ci: try fixing c compiler on windows

* ci: misc minor fixes

* ci: add debug steps

* ci: try to fix windows build

* ci: try using clang on windows

* ci: windows fixes, makefile fix

* Auto-build: Update extensions [skip ci]

* ci: dont produce .exp .lib on Windows

* ci: try forcing shell: bash on commit step

* ci: try to get linux cross-compilation working

* ci: reformulate condition

* ci: fix syntax error

* ci: correct debian image name

* Auto-build: Update extensions [skip ci]

* ci: try to set up macOS cross-compilation

* ci: add ARCH variable to makefile, override it during cross-compilation

* Auto-build: Update extensions [skip ci]

* ci: X64 -> x64

* ci: only trigger extensions.yml on pushes to extensions/

* fix tests on x64

* ci: try using bash for pushing on windows; ignore phpstan error

* fix test failing in ci but passing locally

* bump php version in composer.json, trigger extensions.yml build

* remove comment

* noattach: more explicit return values, avoid potential non-bool return values

* makefile: use -Os on Windows

* ci: use make -B

* ci: try triggering extensions build on extensions.yml file changes

* Auto-build: Update extensions [skip ci]

* Auto-build: Update extensions [skip ci]

* ci: remove windows linker flag, use a whitelist for git add

* Auto-build: Update extensions [skip ci]

* Auto-build: Update extensions [skip ci]

* Auto-build: Update extensions [skip ci]

* fix path in feature class, minor refactor

* Fix code style (php-cs-fixer)

---------

Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-04 15:34:37 +01:00

1.2 KiB

Internal development notes

Updating the docker image used by the GH action

  1. Login in to Docker Hub: docker login -u archtechx
  2. Shut down containers: composer docker-down
  3. Build the image: DOCKER_DEFAULT_PLATFORM=linux/amd64 docker compose build --no-cache
  4. Start containers again, using the amd64 image for the test service: composer docker-up
  5. Verify that tests pass on the new image: composer test
  6. Tag a new image: docker tag tenancy-test archtechx/tenancy:latest
  7. Push the image: docker push archtechx/tenancy:latest
  8. Optional: Rebuild the image again locally for arm64: composer docker-rebuild

Debugging GitHub Actions

The ci.yml workflow includes support for act.

To run all tests using act, run composer act. To run only certain tests using act, use composer act-input "FILTER='some test name'" or composer act -- --input "FILTER='some test name'".

Helpful note: GHA doesn't mount the project at /var/www/html like the docker compose setup does. This can be observed in act where the inner container's filesystem structure will match the host.

Also, for debugging act you can just add a job that does sleep 1h and then docker ps + docker exec -it <id> bash.