Run Performance Tests #50
This file contains 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: Run Performance Tests | |
on: | |
workflow_dispatch: | |
inputs: | |
cache: | |
description: "Cache of GPFS" | |
required: false | |
default: "cold" | |
wy: | |
description: "Water year of data used for test" | |
required: false | |
default: "1997" | |
schedule: | |
# Run at 4am on Monday and Saturday | |
# Jenkins job runs 5am those days to download results | |
- cron: '0 4 * * 1' | |
- cron: '0 4 * * 6' | |
jobs: | |
runscript: | |
runs-on: ubuntu-latest | |
steps: | |
- name: GetCode | |
uses: actions/checkout@v3 | |
- name: SetupPython | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install hf_hydrodata | |
python -m pip install subsettools | |
python -m pip install pytest | |
- name: Run Performance Tests | |
env: | |
TEST_EMAIL_PRIVATE: ${{ secrets.TEST_EMAIL_PRIVATE}} | |
TEST_PIN_PRIVATE: ${{ secrets.TEST_PIN_PRIVATE}} | |
TEST_EMAIL_PUBLIC: ${{ secrets.TEST_EMAIL_PUBLIC}} | |
TEST_PIN_PUBLIC: ${{ secrets.TEST_PIN_PUBLIC}} | |
run: | | |
pytest -s performance/test_1pt_1wy.py --wy=${{ github.event.inputs.wy}} --cache=cold | |
pytest -s performance/test_1pt_1wy.py --wy=${{ github.event.inputs.wy}} --cache=hot | |
pytest -s performance/test_full_3d_pfb.py --wy=2003 --wy_month=${{ github.event.inputs.wy_month}} --cache=cold | |
pytest -s performance/test_full_3d_pfb.py --wy=2003 --wy_month=${{ github.event.inputs.wy_month}} --cache=hot | |
pytest -s performance/test_subset_forcing.py --wy=2007 --cache=cold | |
pytest -s performance/test_subset_forcing.py --wy=2007 --cache=hot | |
echo "Show ./artifacts/log_artifact.csv file" | |
cat ./artifacts/log_artifact.csv | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: log-artifacts | |
path: ./artifacts/ |