From f15ffbde255ecf59fc1ea67a7b62b27ab43f500d Mon Sep 17 00:00:00 2001 From: ThaHobbyist Date: Sat, 11 May 2024 18:04:49 +0530 Subject: [PATCH] Added github action to run automated tests --- .github/workflows/python-testing.yml | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/python-testing.yml diff --git a/.github/workflows/python-testing.yml b/.github/workflows/python-testing.yml new file mode 100644 index 0000000..f1dd709 --- /dev/null +++ b/.github/workflows/python-testing.yml @@ -0,0 +1,35 @@ +# This workflow will install Python dependencies and run tests with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Package testing + +on: + push: + branches: [ "main", "dev" ] + pull_request: + branches: [ "main", "dev" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install pytest anytree setuptools wheel + python setup.py sdist bdist_wheel + python setup.py install + - name: Test with pytest + run: | + pytest -v \ No newline at end of file