Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This repo is currently missing any sort of CI / PR tests.
This means that problems with the changes can only be discovered through manual review (by another person) or after merging it and waiting for the deployment workflow to fail or finish.
It would be preferable to have some automated feedback right away, without having to wait for review or merge.
Changes
This reworks the currently defunct
build.yaml
workflow file to build the Docker image in pull requests, to give us some basic CI / validation and catch basic errors.Unfortunately wg-access-server doesn't have any sort of unit testing set up, neither for the JS frontend code nor the Go backend code, so we can only check whether everything builds successfully.
The workflow is similar to the deployment workflow (docker.yml), except it only builds one architecture (amd64) to speed it up, and doesn't push the image.
It also uses the gha buildx cache to speed up future builds