From 3ad4e182d22daf9687f3a9173b7c2345edf9cb75 Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Mon, 9 Oct 2023 18:09:43 -0600 Subject: [PATCH] Switch to using called workflow to make build dependent on test --- .github/workflows/container_image.yml | 4 +++- .github/workflows/test.yml | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/container_image.yml b/.github/workflows/container_image.yml index 0567b8b6..7ef8b01f 100644 --- a/.github/workflows/container_image.yml +++ b/.github/workflows/container_image.yml @@ -9,9 +9,11 @@ on: jobs: + test: + uses: "./.github/workflows/test.yml" + # When a push to the default branch occurs, build and release "latest" images # When a tag `vX.Y.Z` push occurs, build and release images with that tag - build-and-release-image: name: "Build and release the data server container image" needs: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 384631a5..97e10890 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,10 +1,13 @@ name: "Test" on: - push: - branches: - - "main" + # The tests will be run on the main branch as part of the container build workflow. + # push: + # branches: + # - "main" pull_request: + # Enable running this workflow from the container build workflow: + workflow_call: # Default to bash in login mode; key to activating conda environment