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(github): adds workflows for docker build and and tests (#44) #45

Merged
merged 1 commit into from
Nov 26, 2023

Conversation

dgrebb
Copy link
Owner

@dgrebb dgrebb commented Nov 26, 2023

Will eventually close out #44.

Tests

Backstop

  • Backstop Tests
  • Backstop Integration Tests
  • Backstop Sanity Tests
  • Backstop Smoke Tests

Docker

  • Docker Tests
  • Docker Build & Push
  • Docker Sanity Tests
  • Docker Smoke Tests

A note on Docker and Playwright — to test an image built on GitHub, it seems one must make npm run as root, set 777 permissions on /root and /opt/pw-browsers, reinstall playwright the long way.

In the future I'll make adjustments to the Dockerfile so the workflow doesn't need to override entrypoint. You can see the full, long-form command in .github/workflows/docker-smoke-test.yml and .github/workflows/docker-sanity-test.yml.

Various categories of tests have their own workflow, run independently, or together in a reusable workflow. Bringing them all together:

🙈 Backstop & Docker CI

This is a good first step towards a PR-checks workflow, which can run against any fork PRs to the upstream. For example, here arehttps://github.com/dgrebb/BackstopJS/pull/45/checks the PR checks run against this feature.

Docker Build Artifacts

The docker build workflow initializes the builder, builds the image, tags it as the fork/branch-name (for PR testing purposes), and pushes it to GHCR.

An example of the final workflow-built and pushed container can be seen here. Any fork's workflow-created images will remain unique to their owner.

@dgrebb dgrebb self-assigned this Nov 26, 2023
@dgrebb dgrebb added enhancement New feature or request tests Testing-related tasks and enhancements. labels Nov 26, 2023
@dgrebb dgrebb force-pushed the feature/github-testing-workflows branch from 310abd0 to e9bf8f7 Compare November 26, 2023 05:10
@dgrebb dgrebb merged commit 92573fb into develop Nov 26, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tests Testing-related tasks and enhancements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant