mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
The whole CI process is already slower than GH Actions, no caches.
This commit is contained in:
parent
15f2c879b7
commit
fb0a971730
4 changed files with 31 additions and 75 deletions
33
.github/workflows/docs.yml
vendored
33
.github/workflows/docs.yml
vendored
|
@ -21,11 +21,9 @@ jobs:
|
|||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set Python Version Env Var
|
||||
run: |
|
||||
echo PY_VERSION=$(python -c 'import sys; print("{}.{}".format(*sys.version_info))') >> $GITHUB_ENV
|
||||
|
||||
- name: Install Nox
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install nox
|
||||
|
@ -40,15 +38,6 @@ jobs:
|
|||
docs:
|
||||
- doc/**
|
||||
|
||||
- name: Set Docs Python Cache Key
|
||||
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup Nox Cache
|
||||
uses: pat-s/always-upload-cache@v2.1.3
|
||||
with:
|
||||
path: .nox/
|
||||
key: docs-salt|${{ env.PY }}|${{ hashFiles(format('requirements/static/ci/py{0}/*.txt', env.PY_VERSION)) }}
|
||||
|
||||
- name: Install Python Requirements
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
|
||||
|
@ -95,28 +84,14 @@ jobs:
|
|||
docs:
|
||||
- doc/**
|
||||
|
||||
- name: Set Python Version Env Var
|
||||
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
|
||||
run: |
|
||||
echo PY_VERSION=$(python -c 'import sys; print("{}.{}".format(*sys.version_info))') >> $GITHUB_ENV
|
||||
|
||||
- name: Install Nox
|
||||
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install nox
|
||||
|
||||
- name: Set Docs Python Cache Key
|
||||
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
|
||||
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup Nox Cache
|
||||
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
|
||||
uses: pat-s/always-upload-cache@v2.1.3
|
||||
with:
|
||||
path: .nox/
|
||||
key: docs-man|${{ env.PY }}|${{ hashFiles(format('requirements/static/ci/py{0}/*.txt', env.PY_VERSION)) }}
|
||||
|
||||
- name: Install Python Requirements
|
||||
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
|
||||
env:
|
||||
|
|
30
.github/workflows/lint.yml
vendored
30
.github/workflows/lint.yml
vendored
|
@ -21,24 +21,13 @@ jobs:
|
|||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set Python Version Env Var
|
||||
run: |
|
||||
echo PY_VERSION=$(python -c 'import sys; print("{}.{}".format(*sys.version_info))') >> $GITHUB_ENV
|
||||
|
||||
- name: Install Nox
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install nox
|
||||
|
||||
- name: Set Lint Python Cache Key
|
||||
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup Nox Cache
|
||||
uses: pat-s/always-upload-cache@v2.1.3
|
||||
with:
|
||||
path: .nox/
|
||||
key: lint-salt|${{ env.PY }}|${{ hashFiles(format('requirements/static/ci/py{0}/*.txt', env.PY_VERSION)) }}
|
||||
|
||||
- id: changed-files
|
||||
name: Get Changed Files
|
||||
uses: dorny/paths-filter@v2
|
||||
|
@ -91,24 +80,13 @@ jobs:
|
|||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set Python Version Env Var
|
||||
run: |
|
||||
echo PY_VERSION=$(python -c 'import sys; print("{}.{}".format(*sys.version_info))') >> $GITHUB_ENV
|
||||
|
||||
- name: Install Nox
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install nox
|
||||
|
||||
- name: Set Lint Python Cache Key
|
||||
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup Nox Cache
|
||||
uses: pat-s/always-upload-cache@v2.1.3
|
||||
with:
|
||||
path: .nox/
|
||||
key: lint-tests|${{ env.PY }}|${{ hashFiles(format('requirements/static/ci/py{0}/*.txt', env.PY_VERSION)) }}
|
||||
|
||||
- id: changed-files
|
||||
name: Get Changed Files
|
||||
uses: dorny/paths-filter@v2
|
||||
|
|
32
.github/workflows/pre-commit.yml
vendored
32
.github/workflows/pre-commit.yml
vendored
|
@ -22,14 +22,13 @@ jobs:
|
|||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set Pre-Commit Cache Key
|
||||
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup Pre-Commit Cache
|
||||
uses: pat-s/always-upload-cache@v2.1.3
|
||||
with:
|
||||
path: ~/.cache/pre-commit
|
||||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
- name: Install Pre-Commit
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pre-commit
|
||||
pre-commit install --install-hooks
|
||||
|
||||
- id: changed-files
|
||||
name: Get Changed Files
|
||||
|
@ -46,21 +45,24 @@ jobs:
|
|||
- '**'
|
||||
|
||||
- name: Check ALL Files On Branch
|
||||
uses: pre-commit/action@v2.0.0
|
||||
if: github.event_name != 'pull_request'
|
||||
env:
|
||||
SKIP: lint-salt,lint-tests,pyupgrade,remove-import-headers,rstcheck
|
||||
PIP_EXTRA_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
|
||||
run: |
|
||||
pre-commit run --show-diff-on-failure --color=always --all-files
|
||||
|
||||
- name: Check Changed Files On PR
|
||||
uses: pre-commit/action@v2.0.0
|
||||
if: github.event_name == 'pull_request' && steps.changed-files.outputs.repo == 'true'
|
||||
with:
|
||||
extra_args: --files ${{ join(fromJSON(steps.changed-files.outputs.repo_files), ' ') }}
|
||||
env:
|
||||
SKIP: lint-salt,lint-tests
|
||||
PIP_EXTRA_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
|
||||
run: |
|
||||
pre-commit run --show-diff-on-failure --color=always --files ${{ join(fromJSON(steps.changed-files.outputs.repo_files), ' ') }}
|
||||
|
||||
- name: Check Docs On Deleted Files
|
||||
uses: pre-commit/action@v2.0.0
|
||||
if: steps.changed-files.outputs.deleted == 'true'
|
||||
with:
|
||||
extra_args: check-docs --files ${{ join(fromJSON(steps.changed-files.outputs.deleted_files), ' ') }}
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
|
||||
run: |
|
||||
pre-commit run --show-diff-on-failure --color=always check-docs --files ${{ join(fromJSON(steps.changed-files.outputs.deleted_files), ' ') }}
|
||||
|
|
11
.github/workflows/twine-check.yml
vendored
11
.github/workflows/twine-check.yml
vendored
|
@ -14,17 +14,18 @@ jobs:
|
|||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.pythonLocation }}
|
||||
key: ${{ env.pythonLocation }}-${{ hashFiles('README.rst') }}-${{ hashFiles('.github/workflows/twine-check.yml') }}
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
|
||||
run: |
|
||||
pip install --upgrade pip setuptools wheel
|
||||
pip install twine>=3.4.1
|
||||
- name: Python setup
|
||||
|
||||
- name: Create Source Tarball
|
||||
run: |
|
||||
python3 setup.py sdist
|
||||
|
||||
- name: Twine check
|
||||
run: |
|
||||
python3 -m twine check dist/*
|
||||
|
|
Loading…
Add table
Reference in a new issue