diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..d4dccead --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: Run a one-line script + run: echo Hello, world! + + - name: "Upload coverage to Codecov" + uses: codecov/codecov-action@v2 + with: + fail_ci_if_error: true diff --git a/awesome/__init__.py b/awesome/__init__.py index 4d34acc6..21b14d07 100644 --- a/awesome/__init__.py +++ b/awesome/__init__.py @@ -1,5 +1,14 @@ def smile(): return ":)" + def frown(): return ":(" + + +def bof(): + return ":|" + + +def XD(): + return "XD" diff --git a/tests.py b/tests.py index 92aa2034..bb9ccec2 100644 --- a/tests.py +++ b/tests.py @@ -7,6 +7,15 @@ class TestMethods(unittest.TestCase): def test_add(self): self.assertEqual(awesome.smile(), ":)") + def test_XD(self): + self.assertEqual(awesome.XD(), "XD") + + def test_bof(self): + self.assertEqual(awesome.bof(), ":|") + + def test_frown(self): + self.assertEqual(awesome.frown(), ":(") + if __name__ == '__main__': unittest.main()