aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/lint-test.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/lint-test.yaml')
-rw-r--r--.github/workflows/lint-test.yaml22
1 files changed, 11 insertions, 11 deletions
diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml
index dc83086b..5d8c1aff 100644
--- a/.github/workflows/lint-test.yaml
+++ b/.github/workflows/lint-test.yaml
@@ -1,27 +1,24 @@
name: Lint & Test
on:
- push:
- branches:
- - main
- pull_request:
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
+ workflow_call:
jobs:
lint:
+ strategy:
+ fail-fast: false
+ matrix:
+ python_version: ["3.10", "3.11"]
name: Run Linting & Test Suites
runs-on: ubuntu-latest
steps:
- name: Install Python Dependencies
- uses: HassanAbouelela/actions/setup-python@setup-python_v1.3.1
+ uses: HassanAbouelela/actions/setup-python@setup-python_v1.3.2
with:
# Set dev=true to run pre-commit which is a dev dependency
dev: true
- python_version: "3.10"
- install_args: "--extras async-rediscache"
+ python_version: ${{ matrix.python_version }}
+ install_args: "--extras async-rediscache --only main --only lint --only test"
# We will not run `flake8` here, as we will use a separate flake8
# action.
@@ -43,6 +40,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 --env GUILD_ID=1234 --env IN_CI=true $(docker build --build-arg python_version=${{ matrix.python_version }} -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