From e3b143c147120b5c1c8f76a29bfbc3231b60cc07 Mon Sep 17 00:00:00 2001 From: morrisnein Date: Tue, 5 Dec 2023 16:26:07 +0300 Subject: [PATCH] add tests workflow --- .github/workflows/unit-build.yml | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/unit-build.yml diff --git a/.github/workflows/unit-build.yml b/.github/workflows/unit-build.yml new file mode 100644 index 0000000..d7afa69 --- /dev/null +++ b/.github/workflows/unit-build.yml @@ -0,0 +1,37 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Build + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + timeout-minutes: 15 + strategy: + matrix: + python-version: [ 3.8, 3.9, '3.10' ] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest + pip install . + pip install pytest-cov + - name: Test with pytest + run: | + pytest --cov=pecapiku -s tests/unit + - name: Codecov-coverage + uses: codecov/codecov-action@v1