Skip to content

Commit

Permalink
Migrated some invoke tasks to python-tools-scripts
Browse files Browse the repository at this point in the history
* `tasks/docs.py` -> `tools/precommit/docs.py`
* `tasks/docstrings.py` -> `tools/precommit/docstrings.py`

Refs saltstack#64374

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
  • Loading branch information
s0undt3ch committed May 29, 2023
1 parent 54385e8 commit fa8e815
Show file tree
Hide file tree
Showing 21 changed files with 541 additions and 453 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,18 +283,11 @@ jobs:
id: python-tools-scripts
uses: ./.github/actions/setup-python-tools-scripts

- name: Cache Python Tools Docs Virtualenv
- name: Cache Python Tools Virtualenvs
uses: actions/cache@v3
with:
path: .tools-venvs/docs
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|docs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/docs.txt') }}

- name: Cache Python Tools Changelog Virtualenv
uses: actions/cache@v3
with:
path: .tools-venvs/changelog
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|changelog|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/changelog.txt') }}

path: .tools-venvs
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}

- name: Setup Salt Version
id: setup-salt-version
Expand Down Expand Up @@ -426,11 +419,11 @@ jobs:
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"

- name: Cache Python Tools Build Virtualenv
- name: Cache Python Tools Virtualenvs
uses: actions/cache@v3
with:
path: .tools-venvs/build
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|build|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/build.txt') }}
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}

- name: Build Source Tarball
uses: ./.github/actions/build-source-tarball
Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,18 +336,11 @@ jobs:
id: python-tools-scripts
uses: ./.github/actions/setup-python-tools-scripts

- name: Cache Python Tools Docs Virtualenv
- name: Cache Python Tools Virtualenvs
uses: actions/cache@v3
with:
path: .tools-venvs/docs
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|docs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/docs.txt') }}

- name: Cache Python Tools Changelog Virtualenv
uses: actions/cache@v3
with:
path: .tools-venvs/changelog
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|changelog|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/changelog.txt') }}

path: .tools-venvs
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}

- name: Setup Salt Version
id: setup-salt-version
Expand Down Expand Up @@ -484,11 +477,11 @@ jobs:
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"

- name: Cache Python Tools Build Virtualenv
- name: Cache Python Tools Virtualenvs
uses: actions/cache@v3
with:
path: .tools-venvs/build
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|build|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/build.txt') }}
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}

- name: Build Source Tarball
uses: ./.github/actions/build-source-tarball
Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,18 +326,11 @@ jobs:
id: python-tools-scripts
uses: ./.github/actions/setup-python-tools-scripts

- name: Cache Python Tools Docs Virtualenv
- name: Cache Python Tools Virtualenvs
uses: actions/cache@v3
with:
path: .tools-venvs/docs
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|docs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/docs.txt') }}

- name: Cache Python Tools Changelog Virtualenv
uses: actions/cache@v3
with:
path: .tools-venvs/changelog
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|changelog|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/changelog.txt') }}

path: .tools-venvs
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}

- name: Setup Salt Version
id: setup-salt-version
Expand Down Expand Up @@ -469,11 +462,11 @@ jobs:
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"

- name: Cache Python Tools Build Virtualenv
- name: Cache Python Tools Virtualenvs
uses: actions/cache@v3
with:
path: .tools-venvs/build
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|build|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/build.txt') }}
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}

- name: Build Source Tarball
uses: ./.github/actions/build-source-tarball
Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,18 +325,11 @@ jobs:
id: python-tools-scripts
uses: ./.github/actions/setup-python-tools-scripts

- name: Cache Python Tools Docs Virtualenv
- name: Cache Python Tools Virtualenvs
uses: actions/cache@v3
with:
path: .tools-venvs/docs
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|docs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/docs.txt') }}

- name: Cache Python Tools Changelog Virtualenv
uses: actions/cache@v3
with:
path: .tools-venvs/changelog
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|changelog|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/changelog.txt') }}

path: .tools-venvs
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}

- name: Setup Salt Version
id: setup-salt-version
Expand Down Expand Up @@ -469,11 +462,11 @@ jobs:
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"

- name: Cache Python Tools Build Virtualenv
- name: Cache Python Tools Virtualenvs
uses: actions/cache@v3
with:
path: .tools-venvs/build
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|build|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/build.txt') }}
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}

- name: Build Source Tarball
uses: ./.github/actions/build-source-tarball
Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/templates/ci.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,11 @@ on:
id: python-tools-scripts
uses: ./.github/actions/setup-python-tools-scripts

- name: Cache Python Tools Docs Virtualenv
- name: Cache Python Tools Virtualenvs
uses: actions/cache@v3
with:
path: .tools-venvs/docs
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|docs|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/docs.txt') }}

- name: Cache Python Tools Changelog Virtualenv
uses: actions/cache@v3
with:
path: .tools-venvs/changelog
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|changelog|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/changelog.txt') }}

path: .tools-venvs
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}

- name: Setup Salt Version
id: setup-salt-version
Expand Down Expand Up @@ -245,11 +238,11 @@ on:
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"

- name: Cache Python Tools Build Virtualenv
- name: Cache Python Tools Virtualenvs
uses: actions/cache@v3
with:
path: .tools-venvs/build
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|build|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/build.txt') }}
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|${{ github.job }}|tools-venvs|${{ steps.python-tools-scripts.outputs.version }}|${{ steps.get-python-version.outputs.version }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}

- name: Build Source Tarball
uses: ./.github/actions/build-source-tarball
Expand Down
Loading

0 comments on commit fa8e815

Please sign in to comment.