diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index f6e4ef1..8f6206d 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -10,10 +10,10 @@ on: types: [opened, synchronize, reopened, ready_for_review] jobs: - call-run-python-tests: + setup-test-dir: runs-on: ubuntu-latest steps: - - name: Set test dir + - name: Setup test dir run: | export $TEST_DIR="tests/unit" # if branch is 'main', or the repo is 'openclimatefix/quartz-solar-forecast' @@ -22,14 +22,16 @@ jobs: export $TEST_DIR="" fi echo $TEST_DIR" - - - name: Run Python tests - uses: openclimatefix/.github/.github/workflows/python-test.yml@issue/pip-all - with: - # pytest-cov looks at this folder - pytest_cov_dir: "quartz_solar_forecast" - os_list: '["ubuntu-latest"]' - python-version: "['3.11']" - extra_commands: echo "HF_TOKEN=${{ vars.HF_TOKEN }}" > .env - pytest_numcpus: '1' - test_dir: $TEST_DIR \ No newline at end of file + + call-run-python-tests: + - name: Run Python tests + needs: setup-test-dir + uses: openclimatefix/.github/.github/workflows/python-test.yml@issue/pip-all + with: + # pytest-cov looks at this folder + pytest_cov_dir: "quartz_solar_forecast" + os_list: '["ubuntu-latest"]' + python-version: "['3.11']" + extra_commands: echo "HF_TOKEN=${{ vars.HF_TOKEN }}" > .env + pytest_numcpus: '1' + test_dir: $TEST_DIR \ No newline at end of file