Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: move all testing to GitHub Actions #882

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

alxndrsn
Copy link
Contributor

@alxndrsn alxndrsn commented Jan 30, 2025

Progress towards #677 - this will eventually allow the GHCR upload job to depend on the outcome of tests previously run in CircleCI.

What has been done to verify that this works as intended?

Run github actions

Why is this the best possible solution? Were any other approaches considered?

Alternative could be moving everything to CircleCI, but that probably wouldn't simplify uploading images to GitHub Container Registry (GHCR)

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Should not affect users.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

Should not require documentation updates.

Before submitting this PR, please make sure you have:

  • branched off and targeted the next branch OR only changed documentation/infrastructure (master is stable and used in production)
  • verified that any code or assets from external sources are properly credited in comments or that everything is internally sourced

* allow conditionally building docker containers and uploading them to GHCR, depending on test results
* progress towards getodk#677 using pre-built docker images in the root docker-compose.yml
@alxndrsn alxndrsn merged commit b2a9d4f into getodk:next Feb 13, 2025
3 checks passed
@alxndrsn alxndrsn deleted the move-all-ci-to-gha branch February 13, 2025 06:42
alxndrsn added a commit that referenced this pull request Feb 13, 2025
Noted while working on #882: `files/postgres/upgrade-postgres.sh` is not actually run with `/bin/bash -eu` as its shebang declares, but with `/bin/sh`.

-----

This commit

1. fixes the shell used for `upgrade-postgres.sh`
2. introduces a test which would have detected this issue, and should prevent similar issues in future
3. fixes use of deprecated dockerfile syntax detected by the new test
4. pulls `shellcheck` invocation into a script file to allow easier use locally, and possible future extension

-----

Docker build checks

Currently in beta, "docker build checks" are best-practice lint checks for dockerfiles.

See: https://docs.docker.com/build/checks/#check-a-build-without-building

-----

Dockerfile fixes

* `postgres-upgrade.dockerfile`: https://docs.docker.com/reference/build-checks/json-args-recommended/
* `postgres14.dockerfile`: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

-----

Related: #342
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants