Skip to content

fix typo in condition guarding installation of GitHub token in CI workflow to run unit tests + fix broken tests related to GitHub integration features #4216

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

Merged
merged 10 commits into from
Apr 14, 2023

Conversation

boegel
Copy link
Member

@boegel boegel commented Feb 15, 2023

fixes #4214

@boegel
Copy link
Member Author

boegel commented Feb 15, 2023

draft PR because for some reason the token provided by GitHub isn't recognized as valid

see for example https://github.com/boegel/easybuild-framework/actions/runs/4181752996/jobs/7244026081

$ eb --check-github
...
* GitHub user...easybuild_test => OK
* GitHub token...ghp..FGM (len: 40) => FAIL (validation failed)

@boegel
Copy link
Member Author

boegel commented Feb 17, 2023

@migueldiascosta pointed out to me that we're using ${{secrets.TEST_GITHUB_TOKEN}}, which is a self-defined environment variable, so that probably has a now expired GitHub token...

We should try using the standard GITHUB_TOKEN instead (see https://docs.github.com/en/actions/security-guides/automatic-token-authentication)

@easybuilders easybuilders deleted a comment from boegelbot Apr 14, 2023
@boegel boegel marked this pull request as ready for review April 14, 2023 10:53
@boegel
Copy link
Member Author

boegel commented Apr 14, 2023

Broken tests should all be fixed now, and all GitHub tests pass again when a GitHub token is available (most GitHub tests are skipped when no GitHub token is available, when the test suite is run in the scope of a PR for example, like here). See https://github.com/boegel/easybuild-framework/actions/runs/4698932377 for a run where a GitHub token is available and no tests are skipped.

I had to go back to provided a self-created GitHub token and make it available to the tests as an encrypted secret, because some tests require that the token has gist permissions, for example.

cc @migueldiascosta

@boegel boegel changed the title fix typo in condition guarding installation of GitHub token in CI workflow to run unit tests fix typo in condition guarding installation of GitHub token in CI workflow to run unit tests + fix broken tests related to GitHub integration features Apr 14, 2023
@boegel boegel requested review from migueldiascosta and removed request for migueldiascosta April 14, 2023 10:56
Copy link
Member

@jfgrimm jfgrimm left a comment

Choose a reason for hiding this comment

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

lgtm

@jfgrimm jfgrimm merged commit 3a09a37 into easybuilders:develop Apr 14, 2023
@boegel boegel deleted the fix_skip_github_tests branch April 15, 2023 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests that require GitHub token are always skipped in CI due to silly typo in GitHub Actions workflow
2 participants