Skip to content

Comments

Feat/integration test on pr#506

Open
Koda-Pig wants to merge 7 commits intoGreenstand:mainfrom
Koda-Pig:feat/integration-test-on-pr
Open

Feat/integration test on pr#506
Koda-Pig wants to merge 7 commits intoGreenstand:mainfrom
Koda-Pig:feat/integration-test-on-pr

Conversation

@Koda-Pig
Copy link
Contributor

@Koda-Pig Koda-Pig commented Aug 8, 2025

Description

Updates CI workflow to trigger integration tests on PR ready_for_review event. Includes headless E2E web tests and all workspace unit tests. Changed from lint:fix to lint:check to prevent code mutation during CI.

The new check that runs has some failed tests, but they are the exact same failed tests with the same error messages as when running the tests locally.

Fixes: #504


Changes Made

  • Changes in .github/workflows

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing
    functionality to not work as expected)
  • 📝 Documentation update (changes)

Screenshots

N/A


How Has This Been Tested?

  • Cypress integration
  • Cypress component tests
  • Jest unit tests

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Additional Comments

N/A

This change updates the CI workflow to automatically run integration tests
when a pull request is marked as "ready for review", including PRs from forks
it includes headless end-to-end web tests and all workspace unit tests
Switched from lint:fix to lint:check to avoid automatically modifying code during CI runs
@Koda-Pig Koda-Pig requested a review from a team as a code owner August 8, 2025 12:40
@Koda-Pig Koda-Pig marked this pull request as draft August 8, 2025 13:24
@Koda-Pig Koda-Pig marked this pull request as ready for review August 8, 2025 13:30
@Koda-Pig Koda-Pig mentioned this pull request Aug 8, 2025
7 tasks
@dadiorchen
Copy link
Collaborator

@Koda-Pig I read you code, correct me if I’m wrong:
Seems you didn’t set up the API user API and then run the API when you’re running the end to end test, I did that days ago it all the test passed so please run this command on your local machine and check if all those and test passed if that’s OK then you can consider run it on the CI, by the way, it is unnecessary to use two job for lint, please put them together

@pierrelstan
Copy link
Collaborator

@dadiorchen Would it make sense for @Koda-Pig to combine the e2e-web job with this CI file instead? https://github.com/Greenstand/treetracker-wallet-app/blob/main/.github/workflows/github-ci.yml

@Koda-Pig
Copy link
Contributor Author

Koda-Pig commented Sep 3, 2025

@pierrelstan I was told that I need to insert the DB url to get the tests to work on local, but I must not push that change.
Doesn't that mean the tests cannot work in this environment?

@dadiorchen
Copy link
Collaborator

Yes, let me clarify days. We need a database URL to run the project locally you put it into your environment wearable somewhere, but you cannot push that to cloud so to set up the environment variable in the GITH UB action you need to set up a depository environment, variable in the settings

@pierrelstan
Copy link
Collaborator

@Koda-Pig any updates on this PR ?

@Koda-Pig
Copy link
Contributor Author

@pierrelstan I have some questions about this I was discussing on slack, here is the link to the thread: https://greenstand.slack.com/archives/C05TVUSEQQ0/p1756849804041739?thread_ts=1755160534.279099&cid=C05TVUSEQQ0

I was told I need to insert the database URL somewhere for the tests to work, but I must not commit that change.
How are the tests supposed to work in CI/CD environment if they can only work on local by making a change that can't be committed?

I've been trying to get answers about this for a while now.

@dadiorchen
Copy link
Collaborator

@Koda-Pig if you can run it locally then when you run it in CI/CT you you need to set up the GitHub repository secret

@Koda-Pig
Copy link
Contributor Author

@pierrelstan I still can't get this to work on local.
I've added the the DATABASE_URL to /apps/user/.dev.env and apps/web/.env
I still get the error:

DATABASE_URL is not set!

You can assign this to someone else, I'm not going to work on this anymore.

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.

3 participants