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

Add Integration Tests #239

Merged
merged 25 commits into from
Feb 13, 2022
Merged

Add Integration Tests #239

merged 25 commits into from
Feb 13, 2022

Conversation

thebeanogamer
Copy link
Member

@thebeanogamer thebeanogamer commented Feb 11, 2022

This Pull Request adds integrations tests in GitHub Actions, which perform the following:

  • Boot up backend using the image from GitHub Container Registry
  • Wait 10 seconds for the boot
  • Use make fake-data to generate some test fixtures
  • Shut down the containers
  • Boot up the containers on the current branch
  • Wait 10 seconds for the boot
  • Confirm that the /stats/stats/ endpoint works

To do this, I've had to add a persistent database to the postgres container, but I've updated the clean-dev-server makefile target to clean this up. This is tested within the workflow.

This should hopefully catch things like us writing broken migrations or updating things like twisted which prevent core from booting.

Resolves #238

@thebeanogamer thebeanogamer added the enhancement New feature or request label Feb 11, 2022
@thebeanogamer thebeanogamer self-assigned this Feb 11, 2022
@codecov
Copy link

codecov bot commented Feb 12, 2022

Codecov Report

Merging #239 (2360b0e) into master (fdaaabe) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #239   +/-   ##
=======================================
  Coverage   94.41%   94.41%           
=======================================
  Files         107      107           
  Lines        4767     4767           
  Branches      272      272           
=======================================
  Hits         4501     4501           
  Misses        223      223           
  Partials       43       43           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdaaabe...2360b0e. Read the comment docs.

@thebeanogamer thebeanogamer marked this pull request as ready for review February 12, 2022 16:05
@thebeanogamer thebeanogamer requested review from 0xAda and removed request for 0xAda February 12, 2022 16:05
Copy link
Collaborator

@jchristgit jchristgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Work!

@jchristgit jchristgit enabled auto-merge (squash) February 13, 2022 16:02
Copy link
Contributor

@0xAda 0xAda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jchristgit jchristgit merged commit f5c88ae into master Feb 13, 2022
@jchristgit jchristgit deleted the features/integrationtests branch February 13, 2022 16:16
0xAda pushed a commit that referenced this pull request Sep 26, 2024
* Persist the database in docker-compose
`make clean-dev-server` will remove this

* Add an integration test

* Make curl fail

* Generate some test fixtures

* Wait longer for the boot
GitHub Actions are weak

* Do better shell redirects

* 10 seconds is plenty

* Try and set current working directory

* Revert "Try and set current working directory"

This reverts commit 0c923f5.

* More escaping

* Even more

* Try removing a character

* Spaces

* IT NEARLY WORKS

* Try no tty

* Docker is bad

* Set working directory for exec

* Try less arguments

* Force non interactive

* Try a subshell

* Use smaller fixtures

* Make curl verbose

* Bind to all interfaces

* Test the makefile whilst we're here

* Change test names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration Tests
3 participants