Skip to content

Commit

Permalink
test: push
Browse files Browse the repository at this point in the history
  • Loading branch information
jiajingbin committed Dec 18, 2024
1 parent 8fce805 commit 9ff5704
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
Binary file added .coverage
Binary file not shown.
23 changes: 23 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Python package

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install coverage
- name: Run tests with coverage
run: |
coverage run -m unittest discover
coverage report
8 changes: 4 additions & 4 deletions test_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from calculator import add

class TestCalculator(unittest.TestCase):
def test_add(self):
self.assertEqual(add(2, 3), 5)
def test_add(self):
self.assertEqual(add(2, 3), 5)

if name == 'main':
unittest.main()"
if __name__ == '__main__':
unittest.main()

0 comments on commit 9ff5704

Please sign in to comment.