diff options
author | 2022-02-20 12:21:45 +0000 | |
---|---|---|
committer | 2022-02-20 14:13:03 +0000 | |
commit | 95cf8824509461ec343795e752f3df6309fb8c7c (patch) | |
tree | fc0038d3200497c9d9a306e33486ecaf96bfe9cc | |
parent | Don't call bot.run() if IN_CI env var is set (diff) |
Add a step during lint that inits the bot
This step doesn't actually call bot.run(), and is designed to catch errors in imports/cog setup functions before they are merged.
-rw-r--r-- | .github/workflows/lint.yaml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 14cfb702..2cbfc2f5 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -12,7 +12,7 @@ concurrency: jobs: lint: - name: Run pre-commit & flake8 + name: Run linting & tests runs-on: ubuntu-latest env: # List of licenses that are compatible with the MIT License and @@ -86,6 +86,14 @@ jobs: pip-licenses --allow-only="$ALLOWED_LICENSE" \ --package $(poetry export -f requirements.txt --without-hashes | sed "s/==.*//g" | tr "\n" " ") + # Attempt to run the bot. Setting `IN_CI` to true, so bot.run() is never called. + # This is to catch import and cog setup errors that may appear in PRs, to avoid crash loops if merged. + - name: Attempt bot setup + run: "python -m bot" + env: + USE_FAKEREDIS: true + IN_CI: true + # This step caches our pre-commit environment. To make sure we # do create a new environment when our pre-commit setup changes, # we create a cache key based on relevant factors. |