Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RCFT-PyMarkdown in workflows #191

Merged
merged 8 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/check-container-image-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ jobs:
contents: read

steps:
- uses: docker/setup-buildx-action@v2
-
uses: docker/build-push-action@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v5
with:
push: false
cache-from: type=gha
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/scripts/__init__.py

This file was deleted.

188 changes: 0 additions & 188 deletions .github/workflows/scripts/remove_invalid_tables.py

This file was deleted.

22 changes: 11 additions & 11 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: Install Python Project
uses: CSSUoB/action-install-python-project@v1.0.2
uses: CSSUoB/action-install-python-project@v1.1.0
with:
python-version: 3.12

Expand All @@ -24,31 +24,31 @@ jobs:

steps:
- name: Install Python Project
uses: CSSUoB/action-install-python-project@v1.0.2
uses: CSSUoB/action-install-python-project@v1.1.0
with:
python-version: 3.12

- name: Run mypy
run: poetry run mypy .; poetry run mypy ./.github/workflows/scripts
run: poetry run mypy .

ruff:
runs-on: ubuntu-latest

steps:
- name: Install Python Project
uses: CSSUoB/action-install-python-project@v1.0.2
uses: CSSUoB/action-install-python-project@v1.1.0
with:
python-version: 3.12

- name: Run ruff
- name: Run Ruff
run: poetry run ruff check . --no-fix --extend-select TD002,TD003

poetry-check:
runs-on: ubuntu-latest

steps:
- name: Install Python Project
uses: CSSUoB/action-install-python-project@v1.0.2
uses: CSSUoB/action-install-python-project@v1.1.0
with:
python-version: 3.12

Expand All @@ -60,10 +60,10 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"

Expand All @@ -75,12 +75,12 @@ jobs:

steps:
- name: Install Python Project
uses: CSSUoB/action-install-python-project@v1.0.2
uses: CSSUoB/action-install-python-project@v1.1.0
with:
python-version: 3.12

- name: Run PyMarkdown scan
run: poetry run python ./.github/workflows/scripts/remove_invalid_tables.py && poetry run pymarkdown scan . ; poetry run python ./.github/workflows/scripts/remove_invalid_tables.py --restore
run: poetry run rcft-pymarkdown scan-all

prevent-migrations-deletion:
runs-on: ubuntu-latest
Expand All @@ -92,7 +92,7 @@ jobs:

steps:
- name: Prevent migrations files changing
uses: CSSUoB/action-prevent-file-change@v1
uses: CSSUoB/action-prevent-file-change@v1.7.0
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
pattern: '.*\/db\/.+\/migrations\/\d{4}\w*\.py$'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/update-container-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push'

steps:
- uses: docker/setup-buildx-action@v2
-
uses: docker/login-action@v2
- uses: docker/setup-buildx-action@v3

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
uses: docker/build-push-action@v4

- uses: docker/build-push-action@v5
with:
push: true
# noinspection SpellCheckingInspection
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ENV PYTHONUNBUFFERED=true \

RUN apt-get update && apt-get install --no-install-recommends -y curl build-essential
RUN python3 -m venv $POETRY_HOME
RUN $POETRY_HOME/bin/pip install poetry==1.8.2
RUN $POETRY_HOME/bin/pip install poetry==1.8.3


WORKDIR /app
Expand Down
17 changes: 9 additions & 8 deletions messages.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"welcome_messages": [
"Welcome, <User>. We were expecting you ( ͡° ͜ʖ ͡°)",
"<User> is the lisan al gaib. As it was written!",
"Welcome, <User>. We've been expecting you ( ͡° ͜ʖ ͡°)",
"Welcome <User>. Leave your weapons by the <Group_Name> door.",
"A wild <User> appeared.",
"<User> just arrived. Seems OP - please nerf.",
Expand All @@ -20,14 +21,14 @@
"Their name is, their name is, their name is <User>!",
"I asked ChatGPT how to make <Group_Name> a better place, and it gave us <User>.",
"SkyNet is launching an attack against <Group_Name>! But don't worry, <User> will protect us!",
"Is it a bird? Or is it a plane? Nope! It's <User> coming down in their brand new scooter!",
"Is it a bird? Is it a plane? Nope! It's <User> coming down on their brand new scooter!",
"<User> has hacked their way into the server!",
"`if (username == `<User>`) print('Welcome to <Group_Name>!');`",
"@Committee welcomes <User>",
"My name is <User>, you accessed invalid memory.\nPrepare to Segmentation fault (core dumped)",
"I am become <User>, joiner of the <Group_Name> Discord server",
"<User> navigated here by cardinal directions and vibes",
"<User> has joined the Eternal Scrum",
"I am become <User>, joiner of the <Group_Name> Discord server.",
"<User> navigated here by cardinal directions and vibes.",
"<User> has joined the Eternal Scrum.",
"Their palms are sweaty, knees weak, arms are heavy. <User>'s spaghetti.",
"What’s new <User>-doo, we’re coming after you, you’re gonna solve that mystery.",
"What's that coming over the hill, is that a <User>?",
Expand All @@ -41,14 +42,14 @@
"aaAAAAAAA*AA-* oh wait, it's only <User>",
"<User> entered the server. Fatal error. <Group_Name> shutdown failure.",
"Finally, <User>, a worthy opponent! Our battle will be legendary!",
"I forgot the niceties, you can call me TeX. Hiya Papaya, <User>!",
"I forgot the niceties, you can call me TeX-Bot. Hiya Papaya, <User>!",
"According to all known laws of aviation, there is no way a <User> should be able to fly. Its wings are too small to get its fat little body off the ground. The <User>, of course, flies anyway because <User> doesn't care what humans think is impossible.",
"No one expects the <User> inquisition!",
"Freeze, <User>! This is TeX! You're sentenced to 3 years in the <Group_Name> Discord server for illegally searching us up on the Student Guild website!",
"Freeze, <User>! This is TeX-Bot! You're sentenced to 3 years in the <Group_Name> Discord server for illegally searching us up on the Guild website!",
"Looks like <User> stumbled into the not-so-secret hideout of <Group_Name>.",
"The truth is <User>.... the game was rigged from the start.",
"Did you ever hear the tragedy of Darth <User> the Wise? I thought not, it's not a story the lecturers would tell you.",
"`<coroutine object BaseInductCog.get_random_welcome_message at 0x0000011EFD355120>`"
"`<coroutine object BaseInductCog.get_random_welcome_message at 0x0000011EFD355120; user_object:`<User>`>`"
],
"roles_messages": [
"_ _\nReact to this message to get pronoun roles\n:regional_indicator_h: - He/Him\n:regional_indicator_s: - She/Her\n:regional_indicator_t: - They/Them",
Expand Down