aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/lint-test.yaml
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2022-10-26 15:27:16 +0100
committerGravatar Chris Lovering <[email protected]>2022-12-11 13:46:53 +0000
commit79a2e875a9ec1fe768bcd3b3c88e49b4d294bd90 (patch)
tree930b4087edbd2cd8bf00cbdfc0a79dfdddf72646 /.github/workflows/lint-test.yaml
parentAdd a dry run step to lint & test CI (diff)
Matrix test both 3.10 and 3.11 in CI
Diffstat (limited to '.github/workflows/lint-test.yaml')
-rw-r--r--.github/workflows/lint-test.yaml19
1 files changed, 8 insertions, 11 deletions
diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml
index 52a3e57a..5d8c1aff 100644
--- a/.github/workflows/lint-test.yaml
+++ b/.github/workflows/lint-test.yaml
@@ -1,17 +1,14 @@
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:
@@ -20,8 +17,8 @@ jobs:
with:
# Set dev=true to run pre-commit which is a dev dependency
dev: true
- python_version: "3.11"
- 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.
@@ -44,7 +41,7 @@ jobs:
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
+ 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