File tree Expand file tree Collapse file tree 4 files changed +30
-22
lines changed
Expand file tree Collapse file tree 4 files changed +30
-22
lines changed Original file line number Diff line number Diff line change 11name : Build Docs
22
33on :
4- push :
5- branches :
6- - main
7- pull_request :
84 workflow_dispatch :
9-
10- concurrency :
11- group : docs-deployment-${{ github.ref }}
12- cancel-in-progress : true
5+ workflow_call :
136
147jobs :
158 latest-build :
2518 with :
2619 dev : true
2720 python_version : " 3.11"
28- install_args : " --extras async-rediscache"
21+ install_args : " --extras async-rediscache --only main --only doc "
2922
3023 - name : Generate HTML Site
3124 run : sphinx-build -nW -j auto -b html docs docs/build
Original file line number Diff line number Diff line change 11name : Lint & Test
22
33on :
4- push :
5- branches :
6- - main
7- pull_request :
8-
9- concurrency :
10- group : ${{ github.workflow }}-${{ github.ref }}
11- cancel-in-progress : true
4+ workflow_call :
125
136jobs :
147 lint :
8+ strategy :
9+ fail-fast : false
10+ matrix :
11+ python_version : ["3.10", "3.11"]
1512 name : Run Linting & Test Suites
1613 runs-on : ubuntu-latest
1714 steps :
2017 with :
2118 # Set dev=true to run pre-commit which is a dev dependency
2219 dev : true
23- python_version : " 3.11 "
24- install_args : " --extras async-rediscache"
20+ python_version : ${{ matrix.python_version }}
21+ install_args : " --extras async-rediscache --only main --only lint --only test "
2522
2623 # We will not run `flake8` here, as we will use a separate flake8
2724 # action.
4441 run : python -m pytest -n auto --cov pydis_core -q
4542
4643 - 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
44+ 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
4845
4946 # Prepare the Pull Request Payload artifact. If this fails, we
5047 # we fail silently using the `continue-on-error` option. It's
Original file line number Diff line number Diff line change 1+ name : main
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.ref }}
11+ cancel-in-progress : true
12+
13+ jobs :
14+ lint-test :
15+ uses : ./.github/workflows/lint-test.yaml
16+ docs :
17+ uses : ./.github/workflows/docs.yaml
Original file line number Diff line number Diff line change 1- FROM --platform=linux/amd64 ghcr.io/chrislovering/python-poetry-base:3.10-slim
1+ ARG python_version=3.11
22
3+ FROM --platform=linux/amd64 ghcr.io/chrislovering/python-poetry-base:$python_version-slim
34
45# Install project dependencies
56WORKDIR /app
67COPY pyproject.toml poetry.lock ./
7- RUN poetry install --no-root --without lint,doc,test
8+ RUN poetry install --no-root --only dev,main
89
910# Copy the source code in last to optimize rebuilding the image
1011COPY . .
You can’t perform that action at this time.
0 commit comments