From feef67f59fc9188d134d7f3fe589b43ebf6e3460 Mon Sep 17 00:00:00 2001 From: John Vouvakis Manousakis Date: Tue, 3 Dec 2024 14:28:44 -0800 Subject: [PATCH] Update Github workflows to initialize submodule at checkout. --- .github/workflows/build_docs.yaml | 5 +++-- .github/workflows/deploy_to_pypi.yaml | 10 +++------- .github/workflows/docs_check.yaml | 10 +++------- .github/workflows/format_check.yml | 2 ++ .github/workflows/lint.yml | 2 ++ .github/workflows/spell_check.yml | 9 +++------ .github/workflows/tests.yml | 6 +++--- 7 files changed, 19 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build_docs.yaml b/.github/workflows/build_docs.yaml index bec844c9f..3c5648934 100644 --- a/.github/workflows/build_docs.yaml +++ b/.github/workflows/build_docs.yaml @@ -12,8 +12,9 @@ jobs: os: [ubuntu-latest] python-version: ['3.10'] steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} + - uses: actions/checkout@v4 + with: + submodules: true uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/deploy_to_pypi.yaml b/.github/workflows/deploy_to_pypi.yaml index ff5577e4a..4a0a9b59b 100644 --- a/.github/workflows/deploy_to_pypi.yaml +++ b/.github/workflows/deploy_to_pypi.yaml @@ -1,30 +1,26 @@ name: Deploy to PyPI - on: release: types: [created] - jobs: deploy: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 - + uses: actions/checkout@v4 + with: + submodules: true - name: Set up Python uses: actions/setup-python@v3 with: python-version: '3.10' - - name: Install dependencies run: | python -m pip install --upgrade pip python -m pip install setuptools wheel twine - - name: Build package run: | python setup.py sdist bdist_wheel - - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: diff --git a/.github/workflows/docs_check.yaml b/.github/workflows/docs_check.yaml index 9e150908a..0499f3f79 100644 --- a/.github/workflows/docs_check.yaml +++ b/.github/workflows/docs_check.yaml @@ -1,5 +1,4 @@ name: Check for Sphinx Warnings - on: pull_request: paths: @@ -7,26 +6,23 @@ on: - "**/*.rst" - ".github/workflows/docs_check.yaml" - "setup.py" - jobs: build: runs-on: ubuntu-latest - steps: - name: Check out the repository - uses: actions/checkout@v3 - + uses: actions/checkout@v4 + with: + submodules: true - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.x' - - name: Install dependencies run: | sudo apt-get update sudo apt-get install -y pandoc python -m pip install -e .[development] - - name: Check for Sphinx warnings run: | sphinx-build -M html ./doc/source ./doc/_build --fail-on-warning diff --git a/.github/workflows/format_check.yml b/.github/workflows/format_check.yml index 294f1e458..685431322 100644 --- a/.github/workflows/format_check.yml +++ b/.github/workflows/format_check.yml @@ -5,6 +5,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + submodules: true - uses: chartboost/ruff-action@v1 with: args: 'format --check' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2546c0edb..be1f7f083 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,6 +5,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + submodules: true - uses: chartboost/ruff-action@v1 with: version: 0.7.0 diff --git a/.github/workflows/spell_check.yml b/.github/workflows/spell_check.yml index c894573a1..571020f14 100644 --- a/.github/workflows/spell_check.yml +++ b/.github/workflows/spell_check.yml @@ -1,15 +1,12 @@ name: Spell Check - on: [push, pull_request] - jobs: spell-check: runs-on: ubuntu-latest - steps: - name: Checkout code - uses: actions/checkout@v2 - + uses: actions/checkout@v4 + with: + submodules: true - name: Run codespell uses: codespell-project/actions-codespell@v2 - diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fbff69080..f28e2dd7e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,9 +1,7 @@ name: Tests - on: - push - pull_request - jobs: test: runs-on: ${{ matrix.os }} @@ -12,7 +10,9 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] python-version: ['3.9', '3.10', '3.11','3.12'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + with: + submodules: true - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: