Skip to content

Commit 7979cb9

Browse files
author
ocaisa
authored
Merge pull request #3583 from boegel/fix_github_tests
fix failing GitHub tests due to trivial change in output of 'eb' command
2 parents 84e0585 + 4add76f commit 7979cb9

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/unit_tests.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,20 @@ jobs:
100100
# see https://github.com/<username>/easybuild-framework/settings/secrets
101101
GITHUB_TOKEN: ${{secrets.TEST_GITHUB_TOKEN}}
102102
run: |
103-
if [ ! -z $GITHUB_TOKEN ]; then
104-
if [ "x${{matrix.python}}" == 'x2.6' ];
103+
# don't install GitHub token when testing with Lmod 7.x or non-Lmod module tools,
104+
# to avoid hitting GitHub rate limit;
105+
# tests that require a GitHub token are skipped automatically when no GitHub token is available
106+
if [[ ! "${{matrix.modules_tool}}" =~ 'Lmod-7' ]] && [[ ! "${{matrix.modules_tool}}" =~ 'modules-' ]]; then
107+
if [ ! -z $GITHUB_TOKEN ]; then
108+
if [ "x${{matrix.python}}" == 'x2.6' ];
105109
then SET_KEYRING="keyring.set_keyring(keyring.backends.file.PlaintextKeyring())";
106110
else SET_KEYRING="import keyrings; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring())";
107-
fi;
108-
python -c "import keyring; $SET_KEYRING; keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')";
111+
fi;
112+
python -c "import keyring; $SET_KEYRING; keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')";
113+
fi
114+
echo "GitHub token installed!"
115+
else
116+
echo "Installation of GitHub token skipped!"
109117
fi
110118
111119
- name: install modules tool

test/framework/options.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4184,7 +4184,7 @@ def test_sync_pr_with_develop(self):
41844184

41854185
github_path = r"boegel/easybuild-easyconfigs\.git"
41864186
pattern = '\n'.join([
4187-
r"== temporary log file in case of crash .*",
4187+
r"== Temporary log file in case of crash .*",
41884188
r"== Determined branch name corresponding to easybuilders/easybuild-easyconfigs PR #9150: develop",
41894189
r"== fetching branch 'develop' from https://github\.com/%s\.\.\." % github_path,
41904190
r"== pulling latest version of 'develop' branch from easybuilders/easybuild-easyconfigs\.\.\.",
@@ -4215,7 +4215,7 @@ def test_sync_branch_with_develop(self):
42154215

42164216
github_path = r"boegel/easybuild-easyconfigs\.git"
42174217
pattern = '\n'.join([
4218-
r"== temporary log file in case of crash .*",
4218+
r"== Temporary log file in case of crash .*",
42194219
r"== fetching branch '%s' from https://github\.com/%s\.\.\." % (test_branch, github_path),
42204220
r"== pulling latest version of 'develop' branch from easybuilders/easybuild-easyconfigs\.\.\.",
42214221
r"== merging 'develop' branch into PR branch '%s'\.\.\." % test_branch,

0 commit comments

Comments
 (0)