mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
CI ports from Travis CI (#3435)
* Attempt 1, I suppose. * Add the remaining 2 out of 3 jobs * Spacing matters T_T * So does formatting... * More formatting fixing. * First attempt at postgres services. * Postgres attempt 2 * Update tests.yml Flatten a python version I suppose. * Update tests.yml * Update tests.yml * Update tests.yml * Update tests.yml * I wonder if this works lmao * this is fun™ * let's go back * add fail-fast * Added publishing workflows Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
parent
90b099395b
commit
61ed864e02
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
@ -62,3 +62,4 @@ redbot/setup.py @tekulvw
|
|||||||
# Others
|
# Others
|
||||||
.travis.yml @Kowlin
|
.travis.yml @Kowlin
|
||||||
crowdin.yml @Kowlin
|
crowdin.yml @Kowlin
|
||||||
|
.github/workflows/* @Kowlin
|
||||||
|
|||||||
28
.github/workflows/publish_crowdin.yml
vendored
Normal file
28
.github/workflows/publish_crowdin.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
name: Publish to Crowdin
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v1
|
||||||
|
with:
|
||||||
|
python-version: '3.8'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
|
||||||
|
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install -y crowdin
|
||||||
|
pip install redgettext==3.1
|
||||||
|
- name: Publish
|
||||||
|
env:
|
||||||
|
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
|
||||||
|
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
|
||||||
|
run: |
|
||||||
|
make upload_translations
|
||||||
26
.github/workflows/publish_pypi.yml
vendored
Normal file
26
.github/workflows/publish_pypi.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: Publish to PyPI
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v1
|
||||||
|
with:
|
||||||
|
python-version: '3.8'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install setuptools wheel twine
|
||||||
|
- name: Build and publish
|
||||||
|
env:
|
||||||
|
TWINE_USERNAME: __token__
|
||||||
|
TWINE_PASSWORD: ${{ secrets.pypi_token }}
|
||||||
|
run: |
|
||||||
|
python setup.py sdist bdist_wheel
|
||||||
|
twine upload dist/*
|
||||||
73
.github/workflows/tests.yml
vendored
Normal file
73
.github/workflows/tests.yml
vendored
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
name: Tests
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tox:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python_version:
|
||||||
|
- "3.8"
|
||||||
|
tox_env:
|
||||||
|
- py
|
||||||
|
- style
|
||||||
|
- docs
|
||||||
|
include:
|
||||||
|
- tox_env: py
|
||||||
|
friendly_name: 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
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v1
|
||||||
|
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"
|
||||||
|
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
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v1
|
||||||
|
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
|
||||||
Loading…
x
Reference in New Issue
Block a user