mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
* Update deps + allow Python 3.9
* Add in updates from Jack's branch
* Fix multiple target for cross-reference warnings
* Update a few more Python 3.8 occurrences
* Bump further
* Don't install tox in CodeQL environment
* Bump Python version in docs to 3.9.7
* more bumps
* Add missing pin
* Stop using the deprecated distro.linux_distribution()
* Suppress deprecation warning
* Fix OpenSUSE Leap instructions
* Drop Fedora 32
* Add Python 3.10-dev to CI
* meh
(cherry picked from commit 3254698c78)
Co-authored-by: palmtree5 <3577255+palmtree5@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: palmtree5 <3577255+palmtree5@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
94 lines
2.3 KiB
YAML
94 lines
2.3 KiB
YAML
name: Tests
|
|
on:
|
|
pull_request:
|
|
push:
|
|
repository_dispatch:
|
|
types:
|
|
- dispatched_test
|
|
|
|
env:
|
|
ref: ${{ github.event.client_payload.ref || '' }}
|
|
|
|
jobs:
|
|
tox:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python_version:
|
|
- "3.8"
|
|
tox_env:
|
|
- style
|
|
- docs
|
|
include:
|
|
- tox_env: py38
|
|
python_version: "3.8"
|
|
friendly_name: Python 3.8 - Tests
|
|
- tox_env: py39
|
|
python_version: "3.9"
|
|
friendly_name: Python 3.9 - Tests
|
|
- tox_env: py310
|
|
python_version: "3.10-dev"
|
|
friendly_name: Python 3.10-dev - Tests
|
|
- tox_env: style
|
|
friendly_name: Style
|
|
- tox_env: docs
|
|
friendly_name: Docs
|
|
fail-fast: false
|
|
name: Tox - ${{ matrix.friendly_name }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
ref: ${{ env.ref }}
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python_version }}
|
|
- name: Install tox
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install tox
|
|
- name: Tox test
|
|
env:
|
|
TOXENV: ${{ matrix.tox_env }}
|
|
run: tox
|
|
|
|
tox-postgres:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python_version:
|
|
- "3.8"
|
|
- "3.9"
|
|
- "3.10-dev"
|
|
fail-fast: false
|
|
name: Tox - Postgres
|
|
services:
|
|
postgresql:
|
|
image: postgres:10
|
|
ports:
|
|
- 5432:5432
|
|
env:
|
|
POSTGRES_DB: red_db
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_USER: postgres
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
ref: ${{ env.ref }}
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python_version }}
|
|
- name: Install tox
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install tox
|
|
- name: Tox test
|
|
env:
|
|
TOXENV: postgres
|
|
PGDATABASE: red_db
|
|
PGUSER: postgres
|
|
PGPASSWORD: postgres
|
|
PGPORT: 5432
|
|
run: tox
|