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 github workflows for CI/CD (#44) #1526

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

dgrebb
Copy link
Contributor

@dgrebb dgrebb commented Dec 22, 2023

GitHub Actions (#44)

In a separate branch, I created some GitHub actions and workflows. Happy to submit a PR with those changes as well. And do a walkthrough if you're curious :)

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.

The above was resolved in #1523

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 are the PR and checks run against this feature in my fork.

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.

Docker Tests

All Docker-specific workflows are currently re-installing Playwright by overriding the entrypoint. This had to be done while using the untouched Dockerfile to build this all out. The new Dockerfile in the PR for #34 includes npx playwright install --with-deps to avoid this moving forward.

@garris garris merged commit 64d3210 into garris:master Dec 22, 2023
2 of 8 checks passed
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