From d558538cd1d757af194024838abb7d4434f0b532 Mon Sep 17 00:00:00 2001 From: Dipika Sikka Date: Wed, 21 Feb 2024 20:55:28 +0000 Subject: [PATCH] update unit and nightly tests --- .github/workflows/test-nightly.yml | 17 +++++++++++++++++ .github/workflows/test-unit.yaml | 21 ++++++++++++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/test-nightly.yml diff --git a/.github/workflows/test-nightly.yml b/.github/workflows/test-nightly.yml new file mode 100644 index 00000000..957cecc0 --- /dev/null +++ b/.github/workflows/test-nightly.yml @@ -0,0 +1,17 @@ +name: Run nightly tests +on: + schedule: + - cron: '0 0 * * *' + +jobs: + extensive-python-tests: + runs-on: ubuntu-latest + env: + SPARSEZOO_TEST_MODE: "true" + NM_DISABLE_ANALYTICS: "true" + steps: + - uses: actions/checkout@v2 + - name: "⚙️ Install dependencies" + run: pip3 install .[dev] + - name: "🔬 Running tests" + run: make test TARGETS=full \ No newline at end of file diff --git a/.github/workflows/test-unit.yaml b/.github/workflows/test-unit.yaml index f8ef0be7..0bf828ba 100644 --- a/.github/workflows/test-unit.yaml +++ b/.github/workflows/test-unit.yaml @@ -1,4 +1,4 @@ -name: Basic Test Checks +name: Basic Test Checks - Unit and Smoke on: push: branches: @@ -19,7 +19,7 @@ jobs: ((git diff --name-only origin/main HEAD | grep -E "[src|tests]/sparsezoo|setup.py") || (echo $GITHUB_REF | grep -E "refs/heads/[release/|main]")) && echo "::set-output name=output::1" || echo "::set-output name=output::0" - python-tests: + unit-tests: runs-on: ubuntu-latest env: SPARSEZOO_TEST_MODE: "true" @@ -31,4 +31,19 @@ jobs: - name: "⚙️ Install dependencies" run: pip3 install .[dev] - name: "🔬 Running tests" - run: make test \ No newline at end of file + run: make test + smoke-tests: + runs-on: ubuntu-latest + env: + SPARSEZOO_TEST_MODE: "true" + NM_DISABLE_ANALYTICS: "true" + needs: test-setup + if: ${{needs.test-setup.outputs.python-diff == 1}} + steps: + - uses: actions/checkout@v2 + - name: "⚙️ Install dependencies" + run: pip3 install .[dev] + - name: "🔬 Running tests" + run: make test + - name: Run CLI smoke tests + run: PYTEST_ARGS="-m smoke" make test \ No newline at end of file