-
Notifications
You must be signed in to change notification settings - Fork 25
34 lines (33 loc) · 998 Bytes
/
test-unit.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Basic Test Checks
on:
push:
branches:
- '*'
jobs:
test-setup:
runs-on: ubuntu-latest
outputs:
python-diff: ${{ steps.python-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"
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