Skip to content

Commit 4c19977

Browse files
committed
Add a dry run step to lint & test CI
1 parent cb75ef5 commit 4c19977

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/lint-test.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
- name: Run tests and generate coverage report
4444
run: python -m pytest -n auto --cov pydis_core -q
4545

46+
- name: Build and dry run the example bot to ensure deps can be installed & imported
47+
run: docker run --rm -it --env GUILD_ID=1234 --env IN_CI=true $(docker build -q -f .\dev\Dockerfile .) run python -m dev.bot
48+
4649
# Prepare the Pull Request Payload artifact. If this fails, we
4750
# we fail silently using the `continue-on-error` option. It's
4851
# nice if this succeeds, but if it fails for any reason, it

dev/bot/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ async def main() -> None:
3131
async with bot:
3232
await bot.start(os.getenv("BOT_TOKEN"))
3333

34-
asyncio.run(main())
34+
if os.getenv("IN_CI", "").lower() != "true":
35+
asyncio.run(main())

0 commit comments

Comments
 (0)