Open viniciusdc opened 3 months ago
To ensure that the Makefile is always up-to-date, @dcmcand suggested using it in CI. Creating Makefile with steps followed in .github/workflows/test_local_integration.yaml would be an excellent place to start. We can initially introduce the following make commands:
make init
: This defaults to local deployment.
a. If the OS is Mac, it verifies that the docker-mac-net-connect
service is running.
b. Install Nebari and playwright - link.
c. Initilizes Nebari like in CI for local deployment linkmake deploy
:
a. Deploy Nebari link.
b. Basic kubectl checks after deployment - link.
c. Check nebari url resolves - like.
d. Curl jupyterhub login page - link
e. Create example-user - link.make test
:
a. setup-node - link
b. make run-cypress-tests
- link.
c. make run-playwright-tests
link.
d. make run-unit-tests
link.make clean
:
a. Cleanup nebari deployment - link.
b. kind delete clusters test-cluster
In later PRs, we can extend the same for other providers like GCP, DO, and AWS. For example:
make init --provider=AWS
Other commands can remain the same, except they will run against cloud instances determined by local environment variables. This should let us run cloud-based integration tests.
good point, @pt247; I was only considering including the playwright/cypress installation and test execution commands. But its a really neat idea to also incorporate the deploy/init structures.
Let's use this issue as a super issue to track progress on Nebari Makefile sub-issues/tasks. Renaming the issue to Nebari Makefile.
Thanks @pt247, I was about to assign you to this as well 😄
Update: The following Git Gist contains the Makefile and the Nebari config I am using to create the Nebari cluster locally.
https://gist.github.com/pt247/b17e3bec1dd25421082d109328a938b4
With the above git gist, we can now spin up a local cluster for testing using the Makefile. It still uses Cloudflare for the DNS-01 challenge so that Letsencrypt can generate trusted certificates.
The main issue with this setup is that it needs Cloudflare setup for usable certificates.
There are requirements:
Some links worth exploring to find alternatives for Cloudflare:
We should focus on local certificates while we are working on #2238. In this ticket, we will focus on replace CI tests in Makefile.
Feature description
Currently, our Cypress and Playwright installations rely on GitHub Actions. Transitioning these installation workflows to a Makefile could alleviate some of the maintainers' burdens by simplifying the process of running tests locally. This move would streamline testing and potentially improve efficiency.
Value and/or benefit
Anything else?
No response