From 0898850ab82cd9c57ab4047af90faa29ad253135 Mon Sep 17 00:00:00 2001 From: Ian Laflotte Date: Tue, 5 Nov 2024 14:16:05 -0500 Subject: [PATCH] remove explicit calls to git and use checkout actions submodules field for recursive cloning --- .github/workflows/build_conda.yml | 7 +++---- .github/workflows/create_test_conda_env.yml | 5 ++--- .github/workflows/publish_conda.yml | 3 ++- .github/workflows/python_tests.yaml | 4 +++- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_conda.yml b/.github/workflows/build_conda.yml index 81bc646..0c58a91 100644 --- a/.github/workflows/build_conda.yml +++ b/.github/workflows/build_conda.yml @@ -1,9 +1,8 @@ name: build_conda on: - [push] -# pull_request: -# branches: -# - FOOmainBAR + pull_request: + branches: + - main jobs: build: diff --git a/.github/workflows/create_test_conda_env.yml b/.github/workflows/create_test_conda_env.yml index 7785e5c..8a28475 100644 --- a/.github/workflows/create_test_conda_env.yml +++ b/.github/workflows/create_test_conda_env.yml @@ -7,6 +7,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + submodules: 'recursive' - name: Set up Python uses: actions/setup-python@v5 with: @@ -26,9 +28,6 @@ jobs: # add conda env's executables to github's PATH equiv. echo $CONDA/envs/fms_yaml_tools/bin >> $GITHUB_PATH - # get fms_yaml_tools/schema/gfdl_msd_schemas/FMS for unittest - git submodule update --init --recursive --remote - # use *conda environment's pip* to install fms_yaml_tools # called w/ full path to conda's python for explicitness # called as a module (-m pip) for explicitness diff --git a/.github/workflows/publish_conda.yml b/.github/workflows/publish_conda.yml index 2d4859a..a955dd6 100644 --- a/.github/workflows/publish_conda.yml +++ b/.github/workflows/publish_conda.yml @@ -11,6 +11,8 @@ jobs: steps: - name: Checkout Files uses: actions/checkout@v4 + with: + submodules: 'recursive' - name: Run Conda to Build and Publish run: | conda config --append channels conda-forge @@ -18,5 +20,4 @@ jobs: conda install conda-build anaconda-client conda-verify export ANACONDA_API_TOKEN=${{ secrets.ANACONDA_TOKEN }} conda config --set anaconda_upload yes - git submodule update --init --recursive --remote conda build . diff --git a/.github/workflows/python_tests.yaml b/.github/workflows/python_tests.yaml index 3a64dd5..3ee8b4c 100644 --- a/.github/workflows/python_tests.yaml +++ b/.github/workflows/python_tests.yaml @@ -11,7 +11,9 @@ jobs: python-version: ["3.7", "3.8", "3.9", "3.10"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + submodules: 'recursive' - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: