From 9cbe180a87f8c19b6b8e6a80e5f9e62649bd8b3e Mon Sep 17 00:00:00 2001 From: Isha <101532829+Ig2027@users.noreply.github.com> Date: Sat, 21 Feb 2026 18:43:12 -0800 Subject: [PATCH] add unit tests for simple_calculator --- ".github\\workflows/run_test.yml" | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 ".github\\workflows/run_test.yml" diff --git "a/.github\\workflows/run_test.yml" "b/.github\\workflows/run_test.yml" new file mode 100644 index 00000000..c45bcbfc --- /dev/null +++ "b/.github\\workflows/run_test.yml" @@ -0,0 +1,32 @@ +name: simple_calculator unit test + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with Ruff + run: | + pip install ruff + ruff --format=github --target-version=py310 . + continue-on-error: true + - name: Test with pytest + run: | + coverage run -m pytest tests/tests_1b.py -v -s + - name: Generate Coverage Report + run: | + coverage report -m \ No newline at end of file