This repository was archived by the owner on Jun 3, 2025. It is now read-only.
Final SparseZoo (#495) #1396
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Checks | |
on: | |
pull_request: | |
branches: | |
- main | |
- 'release/*' | |
push: | |
branches: | |
- main | |
- 'release/*' | |
jobs: | |
test-setup: | |
runs-on: ubuntu-latest | |
outputs: | |
python-diff: ${{ steps.python-check.outputs.output }} | |
full-check: ${{ steps.full-check.outputs.output }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: "Checking if sparsezoo python code was changed" | |
id: python-check | |
run: > | |
((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" | |
- name: "Checking if full tests need to run" | |
id: full-check | |
run: > | |
(echo $GITHUB_REF | grep -E "refs/heads/[release/|main]") | |
&& echo "::set-output name=output::1" || echo "::set-output name=output::0" | |
python-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 | |
extensive-python-tests: | |
runs-on: ubuntu-latest | |
env: | |
SPARSEZOO_TEST_MODE: "true" | |
NM_DISABLE_ANALYTICS: "true" | |
needs: test-setup | |
if: ${{needs.test-setup.outputs.full-check == 1}} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: "⚙️ Install dependencies" | |
run: pip3 install .[dev] | |
- name: "🔬 Running tests" | |
run: make test TARGETS=full |