From 3421ad478707c046133db0f469ca3d48edb8944e Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Sat, 5 Oct 2024 22:34:15 +0500 Subject: [PATCH] Add github action for unit tests --- .github/workflows/tests.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..9ca5a75 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,28 @@ +name: Unit Tests + +on: [push] + +jobs: + run-unit-test: + name: Run Unit Tests + runs-on: ubuntu-latest + container: + image: ghcr.io/truenas/middleware:master + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Install dev-tools + run: | + install-dev-tools + + - name: Install dependencies + run: | + apt install python3-pytest-mock -y + + - name: Run Tests + run: | + PYTHONPATH=$(pwd) pytest apps_validation/pytest/unit/ + PYTHONPATH=$(pwd) pytest catalog_reader/pytest/unit/ + PYTHONPATH=$(pwd) pytest apps_schema/pytest/unit/