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

Quarantine flaky tests #5631

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

Quarantine flaky tests #5631

wants to merge 20 commits into from

Conversation

schoork
Copy link
Collaborator

@schoork schoork commented Apr 21, 2024

What github issue is this PR for, if any?

N/A

What changed, and why?

Automatically quarantine flaky tests and un-quarantine tests that are no longer flaky. See the wiki for more info.

How will this affect user permissions?

N/A

How is this tested? (please write tests!) 💖💪

Screenshots please :)

Feelings gif (optional)

What gif best describes your feeling working on this issue? https://giphy.com/
How to embed:
![alt text](https://media.giphy.com/media/1nP7ThJFes5pgXKUNf/giphy.gif)

Feedback please? (optional)

We are very interested in your feedback! Please give us some :) https://forms.gle/1D5ACNgTs2u9gSdh9

@github-actions github-actions bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Apr 21, 2024
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nothing actually changed here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nothing actually changed here.

@@ -84,8 +84,11 @@ group :test do
gem "capybara-screenshot"
gem "database_cleaner-active_record"
gem "email_spec"
gem "google_drive", "~> 3"
Copy link
Collaborator

Choose a reason for hiding this comment

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

google drive? why?


config.quarantine_database = {
type: :google_sheets,
authorization: {type: :service_account_key, file: Rails.root.join("spec", "quarantine", "service-account.json")},
Copy link
Collaborator

Choose a reason for hiding this comment

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

whose account are we going to use here?

@compwron
Copy link
Collaborator

https://github.com/flexport/quarantine seems unmaintained but probably works
https://github.com/gimite/google-drive-ruby also unmaintained but probably works
good docs https://github.com/rubyforgood/casa/wiki/Auto%E2%80%90Quarantined-Tests

- name: Decrypt service-account.json
run: ./spec/quarantine/decrypt_secret.sh
env:
QUARANTINE_SERVICE_ACCOUNT_PASSPHRASE: ${{ secrets.QUARANTINE_SERVICE_ACCOUNT_PASSPHRASE }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am doing something similar. Unfortunately, this does not work on PRs are pushed from a fork because secrets do not get passed to runner pushed from a fork (https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#using-secrets-in-a-workflow).

Ex: I pulled down this PR and pushed it myself and it failed https://github.com/rubyforgood/casa/actions/runs/8888424582/job/24405217184

I just ran into this issue so I don't have a solution unfortunately.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's failing now cause the secret doesn't exist. It could also be the fork issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code Tests! 🎉💖👏
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants