Skip to content

Commit

Permalink
only run latest on workflow_dispatch (#736)
Browse files Browse the repository at this point in the history
Co-authored-by: swryan <swryan@users.noreply.github.com>
  • Loading branch information
swryan and swryan committed Apr 22, 2022
1 parent 4e89d6f commit 3212564
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions .github/workflows/dymos_tests_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:

steps:
- name: Display run details
if: (github.event_name != 'workflow_dispatch' || matrix.NAME == 'latest')
run: |
echo "============================================================="
echo "Run #${GITHUB_RUN_NUMBER}"
Expand All @@ -106,6 +107,7 @@ jobs:
echo "============================================================="
- name: Create SSH key
if: (github.event_name != 'workflow_dispatch' || matrix.NAME == 'latest')
shell: bash
env:
SSH_PRIVATE_KEY: ${{secrets.SSH_PRIVATE_KEY}}
Expand All @@ -117,13 +119,16 @@ jobs:
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- name: Checkout code
if: (github.event_name != 'workflow_dispatch' || matrix.NAME == 'latest')
uses: actions/checkout@v2

- name: Fetch tags
if: (github.event_name != 'workflow_dispatch' || matrix.NAME == 'latest')
run: |
git fetch --prune --unshallow --tags
- name: Install miniconda
if: (github.event_name != 'workflow_dispatch' || matrix.NAME == 'latest')
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test
Expand All @@ -135,6 +140,7 @@ jobs:
use-only-tar-bz2: true

- name: Install Numpy/Scipy
if: (github.event_name != 'workflow_dispatch' || matrix.NAME == 'latest')
shell: bash -l {0}
run: |
echo "============================================================="
Expand All @@ -143,7 +149,7 @@ jobs:
conda install numpy=${{ matrix.NUMPY }} scipy=${{ matrix.SCIPY }} -q -y
- name: Install jax
if: matrix.JAX
if: (github.event_name != 'workflow_dispatch' || matrix.NAME == 'latest') && matrix.JAX
shell: bash -l {0}
run: |
echo "============================================================="
Expand All @@ -153,7 +159,7 @@ jobs:
pip install jaxlib
- name: Install libscotch
if: matrix.name == 'oldest'
if: (github.event_name != 'workflow_dispatch' && matrix.name == 'oldest')
shell: bash -l {0}
run: |
echo "============================================================="
Expand All @@ -162,7 +168,7 @@ jobs:
sudo apt-get install -y libscotch-6.0
- name: Install PETSc
if: matrix.PETSc
if: (github.event_name != 'workflow_dispatch' || matrix.NAME == 'latest') && matrix.PETSc
shell: bash -l {0}
run: |
echo "============================================================="
Expand All @@ -176,7 +182,7 @@ jobs:
echo "OMPI_MCA_rmaps_base_oversubscribe=1" >> $GITHUB_ENV
- name: Install pyOptSparse
if: matrix.PYOPTSPARSE
if: (github.event_name != 'workflow_dispatch' || matrix.NAME == 'latest') && matrix.PYOPTSPARSE
shell: bash -l {0}
run: |
echo "============================================================="
Expand Down Expand Up @@ -208,7 +214,7 @@ jobs:
echo "LD_LIBRARY_PATH=$HOME/ipopt/lib" >> $GITHUB_ENV
- name: Install MBI
if: matrix.MBI
if: (github.event_name != 'workflow_dispatch' || matrix.NAME == 'latest') && matrix.MBI
shell: bash -l {0}
run: |
echo "============================================================="
Expand All @@ -219,7 +225,7 @@ jobs:
pip install .
- name: Install OpenMDAO
if: matrix.OPENMDAO
if: (github.event_name != 'workflow_dispatch' || matrix.NAME == 'latest') && matrix.OPENMDAO
shell: bash -l {0}
run: |
echo "============================================================="
Expand All @@ -234,7 +240,7 @@ jobs:
fi
- name: Install optional dependencies
if: matrix.OPTIONAL == '[all]'
if: (github.event_name != 'workflow_dispatch' || matrix.NAME == 'latest') && matrix.OPTIONAL == '[all]'
shell: bash -l {0}
run: |
echo "============================================================="
Expand All @@ -243,6 +249,7 @@ jobs:
pip install bokeh
- name: Install Dymos
if: (github.event_name != 'workflow_dispatch' || matrix.NAME == 'latest')
shell: bash -l {0}
run: |
echo "============================================================="
Expand All @@ -251,12 +258,14 @@ jobs:
pip install .${{ matrix.OPTIONAL }}
- name: Display conda info
if: (github.event_name != 'workflow_dispatch' || matrix.NAME == 'latest')
shell: bash -l {0}
run: |
conda info
conda list
- name: Run tests
if: (github.event_name != 'workflow_dispatch' || matrix.NAME == 'latest')
env:
DYMOS_CHECK_PARTIALS: True
shell: bash -l {0}
Expand All @@ -273,6 +282,7 @@ jobs:
testflo dymos -n 1 --pre_announce --show_skipped --coverage --coverpkg dymos
- name: Submit coverage
if: (github.event_name != 'workflow_dispatch')
shell: bash -l {0}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -288,7 +298,7 @@ jobs:
coveralls --basedir $SITE_DIR
- name: Build docs
if: ${{ matrix.DOCS == '1' || matrix.DOCS == '2' }}
if: (github.event_name != 'workflow_dispatch') && (matrix.DOCS == '1' || matrix.DOCS == '2')
id: build_docs
shell: bash -l {0}
run: |
Expand All @@ -302,7 +312,11 @@ jobs:
- name: Display doc build reports
continue-on-error: True
if: failure() && (matrix.DOCS == '1' || matrix.DOCS == '2') && steps.build_docs.outcome == 'failure'
if: |
github.event_name != 'workflow_dispatch' &&
failure() &&
(matrix.DOCS == '1' || matrix.DOCS == '2') &&
steps.build_docs.outcome == 'failure'
run: |
for f in /home/runner/work/dymos/dymos/docs/dymos_book/_build/html/reports/*; do
echo "============================================================="
Expand All @@ -312,7 +326,9 @@ jobs:
done
- name: Publish docs
if: ${{ matrix.DOCS == '2' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
if: |
github.event_name == 'push' && github.ref == 'refs/heads/master' &&
matrix.DOCS == '2'
shell: bash -l {0}
run: |
echo "============================================================="
Expand All @@ -325,6 +341,7 @@ jobs:
coveralls:
name: Finish coveralls
if: (github.event_name != 'workflow_dispatch')
needs: test_ubuntu
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 3212564

Please sign in to comment.