Skip to content

Commit

Permalink
divide out workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Nov 18, 2024
1 parent c4bf3a8 commit ec8490c
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
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

0 comments on commit ec8490c

Please sign in to comment.