autograph
autograph copied to clipboard
AUT-105: Add GitHub Workflows for building, integration and unit testing.
This attempts to add a Github workflow to build the docker images then run the unit and integration tests. While github seems to build slower than CircleCI, we make up for it by running the integration tests in parallel with a matrix job.
In order to get the monitor tests working, we had to cherry-pick PR #908 onto this branch to clean up the handoff of the root hash between autograph and the lambda emulator.
This makes no attempt to deploy the image as we will need Dockerhub credentials to do that, and it would be better suited for a followup PR.
For a quick high-level tour of how this works:
- We create a new docker compose file
tools/autograph-client/integration-tests.yml
which extends the top level compose file, and adds a service for each integration test. This allows each test to define which container it runs on, the dependencies and how to run the test. - Use Docker entrypoints for the tests to resolve startup timing between containers (IMO, this is a bug in Docker compose, but it's above my paygrade to fix that).
- Write a github action to build the docker containers and upload it as an artifact.
- Parse the integration test YAML to enumerate the test jobs.
- Use a matrix job to download the container and run the tests in parallel.