diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6033586 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: Build & Test + +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 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) diff --git a/requirements.txt b/requirements.txt index f59f702..6f92cad 100644 Binary files a/requirements.txt and b/requirements.txt differ 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()