From f5bc030bfcf1dffc82be420dbd088a56a0d07253 Mon Sep 17 00:00:00 2001 From: Vallari Agrawal Date: Fri, 24 Nov 2023 18:12:57 +0530 Subject: [PATCH] .github/workflows: add unit_tests.yaml Add unit tests in github CI workflow for running unit tests with tox on PRs. Ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#running-tests-with-tox Signed-off-by: Vallari Agrawal --- .github/workflows/unit_tests.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/unit_tests.yaml diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml new file mode 100644 index 0000000..61396d0 --- /dev/null +++ b/.github/workflows/unit_tests.yaml @@ -0,0 +1,22 @@ +name: Unit Tests (with tox) +on: pull_request + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python: ["3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + - name: Install tox and any other packages + run: pip install tox + - name: Run tox + # Run tox using the version of Python in `PATH` + run: tox -e py