aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/CODEOWNERS20
-rw-r--r--.github/workflows/build.yml4
-rw-r--r--.github/workflows/deploy.yml6
-rw-r--r--.github/workflows/lint-test.yml36
-rw-r--r--.github/workflows/sentry_release.yml4
-rw-r--r--.github/workflows/status_embed.yaml4
6 files changed, 48 insertions, 26 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 6dfe7e859..ea69f7677 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -4,10 +4,10 @@
**/bot/exts/moderation/*silence.py @MarkKoz
bot/exts/info/codeblock/** @MarkKoz
bot/exts/utils/extensions.py @MarkKoz
-bot/exts/utils/snekbox.py @MarkKoz @Akarys42 @jb3
-bot/exts/help_channels/** @MarkKoz @Akarys42
-bot/exts/moderation/** @Akarys42 @mbaruh @Den4200 @ks129 @jb3
-bot/exts/info/** @Akarys42 @Den4200 @jb3
+bot/exts/utils/snekbox.py @MarkKoz @jb3
+bot/exts/help_channels/** @MarkKoz
+bot/exts/moderation/** @mbaruh @Den4200 @ks129 @jb3
+bot/exts/info/** @Den4200 @jb3
bot/exts/info/information.py @mbaruh @jb3
bot/exts/filters/** @mbaruh @jb3
bot/exts/fun/** @ks129
@@ -21,22 +21,16 @@ bot/rules/** @mbaruh
bot/utils/extensions.py @MarkKoz
bot/utils/function.py @MarkKoz
bot/utils/lock.py @MarkKoz
-bot/utils/regex.py @Akarys42
bot/utils/scheduling.py @MarkKoz
# Tests
tests/_autospec.py @MarkKoz
tests/bot/exts/test_cogs.py @MarkKoz
-tests/** @Akarys42
# CI & Docker
-.github/workflows/** @MarkKoz @Akarys42 @SebastiaanZ @Den4200 @jb3
-Dockerfile @MarkKoz @Akarys42 @Den4200 @jb3
-docker-compose.yml @MarkKoz @Akarys42 @Den4200 @jb3
-
-# Tools
-poetry.lock @Akarys42
-pyproject.toml @Akarys42
+.github/workflows/** @MarkKoz @SebastiaanZ @Den4200 @jb3
+Dockerfile @MarkKoz @Den4200 @jb3
+docker-compose.yml @MarkKoz @Den4200 @jb3
# Statistics
bot/async_stats.py @jb3
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 84a671917..f8f2c8888 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -8,6 +8,10 @@ on:
types:
- completed
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
jobs:
build:
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push'
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 8b809b777..88abe6fb6 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -8,6 +8,10 @@ on:
types:
- completed
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
jobs:
build:
environment: production
@@ -38,6 +42,6 @@ jobs:
uses: Azure/k8s-deploy@v1
with:
manifests: |
- bot/deployment.yaml
+ namespaces/default/bot/deployment.yaml
images: 'ghcr.io/python-discord/bot:${{ steps.sha_tag.outputs.tag }}'
kubectl-version: 'latest'
diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml
index d96f324ec..f2c9dfb6c 100644
--- a/.github/workflows/lint-test.yml
+++ b/.github/workflows/lint-test.yml
@@ -6,11 +6,25 @@ on:
- main
pull_request:
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
jobs:
lint-test:
runs-on: ubuntu-latest
env:
+ # List of licenses that are compatible with the MIT License and
+ # can be used in our project
+ ALLOWED_LICENSE: Apache Software License;
+ BSD License;
+ GNU Library or Lesser General Public License (LGPL);
+ ISC License (ISCL);
+ MIT License;
+ Mozilla Public License 2.0 (MPL 2.0);
+ Public Domain;
+ Python Software Foundation License
+
# Dummy values for required bot environment variables
BOT_API_KEY: foo
BOT_SENTRY_DSN: blah
@@ -67,6 +81,15 @@ jobs:
pip install poetry
poetry install
+ # Check all of our non-dev dependencies are compatible with the MIT license.
+ # If you added a new dependencies that is being rejected,
+ # please make sure it is compatible with the license for this project,
+ # and add it to the ALLOWED_LICENSE variable
+ - name: Check Dependencies License
+ run: |
+ pip-licenses --allow-only="$ALLOWED_LICENSE" \
+ --package $(poetry export -f requirements.txt --without-hashes | sed "s/==.*//g" | tr "\n" " ")
+
# This step caches our pre-commit environment. To make sure we
# do create a new environment when our pre-commit setup changes,
# we create a cache key based on relevant factors.
@@ -97,19 +120,8 @@ jobs:
--format='::error file=%(path)s,line=%(row)d,col=%(col)d::\
[flake8] %(code)s: %(text)s'"
- # We run `coverage` using the `python` command so we can suppress
- # irrelevant warnings in our CI output.
- name: Run tests and generate coverage report
- run: |
- python -Wignore -m coverage run -m unittest
- coverage report -m
-
- # This step will publish the coverage reports coveralls.io and
- # print a "job" link in the output of the GitHub Action
- - name: Publish coverage report to coveralls.io
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: coveralls
+ run: pytest -n auto --cov --disable-warnings -q
# Prepare the Pull Request Payload artifact. If this fails, we
# we fail silently using the `continue-on-error` option. It's
diff --git a/.github/workflows/sentry_release.yml b/.github/workflows/sentry_release.yml
index f6a1e1f0e..48f5e50f4 100644
--- a/.github/workflows/sentry_release.yml
+++ b/.github/workflows/sentry_release.yml
@@ -5,6 +5,10 @@ on:
branches:
- main
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
jobs:
create_sentry_release:
runs-on: ubuntu-latest
diff --git a/.github/workflows/status_embed.yaml b/.github/workflows/status_embed.yaml
index b6a71b887..4178c366d 100644
--- a/.github/workflows/status_embed.yaml
+++ b/.github/workflows/status_embed.yaml
@@ -9,6 +9,10 @@ on:
types:
- completed
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
jobs:
status_embed:
# We need to send a status embed whenever the workflow