From 70b6ce728fb11eaea04bccc01474bd687ed9e275 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Fri, 15 Apr 2022 02:52:23 +0100 Subject: [PATCH 1/5] Add build.yml workflow --- .github/workflows/build.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4f17a29 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: Build & Test !charity Bot + +on: + push: + branches: + - '**' + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Test with unittest + run: | + python -m unittest tests/test.py \ No newline at end of file From b8a085c95dbd8802beb5ef79863a0ea8e7960f77 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Fri, 15 Apr 2022 02:52:41 +0100 Subject: [PATCH 2/5] Only run bot when running runner.py --- exclamation_mark_charity/runner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exclamation_mark_charity/runner.py b/exclamation_mark_charity/runner.py index 003f24a..c8d8f44 100644 --- a/exclamation_mark_charity/runner.py +++ b/exclamation_mark_charity/runner.py @@ -12,4 +12,5 @@ async def charity(ctx: Context): await ctx.send("!charity") -bot.run(BOT_TOKEN) +if __name__ == '__main__': + bot.run(BOT_TOKEN) From 106ff3cf10da21f0ddb2a4dba4d33f497c556922 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Fri, 15 Apr 2022 02:52:51 +0100 Subject: [PATCH 3/5] Add the greatest test ever --- tests/test.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/test.py diff --git a/tests/test.py b/tests/test.py new file mode 100644 index 0000000..6ccc9a7 --- /dev/null +++ b/tests/test.py @@ -0,0 +1,10 @@ +import unittest + + +class TestTrue(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + +if __name__ == '__main__': + unittest.main() From 28af184cf55db559475d710a0442eac740ea7dac Mon Sep 17 00:00:00 2001 From: sgoudham Date: Fri, 15 Apr 2022 02:55:58 +0100 Subject: [PATCH 4/5] Resolve dependency conflicts --- requirements.txt | Bin 606 -> 606 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/requirements.txt b/requirements.txt index f59f70224c8e076b61b3eea1b285f7830f360622..6f92cad6a6422dfeb027839705fb7bba56c48bd7 100644 GIT binary patch delta 42 ocmcb|a*t(#1gklN9)rn5S!GURAj1HN4JUdA!Z{`z7w={S0L7pQ3;+NC delta 42 ocmcb|a*t(#1giyu9)saTS!GTWAj1HNjV5{q!Z`*T7w={S0L6<52><{9 From b1396fb4474208a27945e8fec9a9e4d7f5e28425 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Fri, 15 Apr 2022 02:58:05 +0100 Subject: [PATCH 5/5] Rename workflow --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4f17a29..6033586 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build & Test !charity Bot +name: Build & Test on: push: