diff options
author | 2022-10-26 15:22:36 +0100 | |
---|---|---|
committer | 2022-12-11 13:46:53 +0000 | |
commit | 4c1997790a2b0ee295bfe6909570f888ad82db8c (patch) | |
tree | abc0e5486b21aced482bb2344cfa6d1251dbdeb5 | |
parent | Update dockerignore to include dev dir (diff) |
Add a dry run step to lint & test CI
-rw-r--r-- | .github/workflows/lint-test.yaml | 3 | ||||
-rw-r--r-- | dev/bot/__main__.py | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 222deb24..52a3e57a 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -43,6 +43,9 @@ jobs: - name: Run tests and generate coverage report run: python -m pytest -n auto --cov pydis_core -q + - name: Build and dry run the example bot to ensure deps can be installed & imported + run: docker run --rm -it --env GUILD_ID=1234 --env IN_CI=true $(docker build -q -f .\dev\Dockerfile .) run python -m dev.bot + # Prepare the Pull Request Payload artifact. If this fails, we # we fail silently using the `continue-on-error` option. It's # nice if this succeeds, but if it fails for any reason, it diff --git a/dev/bot/__main__.py b/dev/bot/__main__.py index 1b1a551a..e28be36b 100644 --- a/dev/bot/__main__.py +++ b/dev/bot/__main__.py @@ -31,4 +31,5 @@ async def main() -> None: async with bot: await bot.start(os.getenv("BOT_TOKEN")) -asyncio.run(main()) +if os.getenv("IN_CI", "").lower() != "true": + asyncio.run(main()) |