release v4.0.0 #101
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Testing | |
on: [push, pull_request] | |
jobs: | |
Pre-Commit: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: "3.10" | |
- name: Set Cache Key | |
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV | |
- name: Install System Deps | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libxml2 libxml2-dev libxslt-dev | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
- uses: pre-commit/action@v1.0.1 | |
Docs: | |
runs-on: ubuntu-22.04 | |
needs: Pre-Commit | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.10 For Nox | |
uses: actions/setup-python@v1 | |
with: | |
python-version: "3.10" | |
- name: Install Nox | |
run: | | |
python -m pip install --upgrade pip | |
pip uninstall -y distro-info | |
pip install nox | |
- name: Install Doc Requirements | |
env: | |
SALT_REQUIREMENT: salt==3006.1 | |
run: | | |
nox --force-color -e docs --install-only | |
- name: Build Docs | |
env: | |
SKIP_REQUIREMENTS_INSTALL: YES | |
run: | | |
nox --force-color -e docs | |
Linux: | |
runs-on: ubuntu-22.04 | |
needs: Pre-Commit | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
max-parallel: 4 | |
matrix: | |
python-version: | |
- "3.10" | |
salt-version: | |
- 3006.1 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Nox | |
run: | | |
python -m pip install --upgrade pip | |
pip uninstall -y distro-info | |
pip install nox | |
- name: Install Test Requirements | |
env: | |
SALT_REQUIREMENT: salt==${{ matrix.salt-version }} | |
run: | | |
nox --force-color -e tests-3 --install-only | |
- name: Unit Test | |
env: | |
SALT_REQUIREMENT: salt==${{ matrix.salt-version }} | |
SKIP_REQUIREMENTS_INSTALL: YES | |
run: | | |
nox --force-color -e tests-3 -- -vv tests/unit | |
- name: Integration Test | |
if: false | |
env: | |
SALT_REQUIREMENT: salt==${{ matrix.salt-version }} | |
SKIP_REQUIREMENTS_INSTALL: YES | |
run: | | |
nox --force-color -e tests-3 -- -vv tests/integration | |
- name: Create CodeCov Flags | |
if: always() | |
id: codecov-flags | |
run: | | |
echo ::set-output name=flags::$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-22.04', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))") | |
- name: Upload Project Code Coverage | |
if: always() | |
shell: bash | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
REPORT_FLAGS: ${{ steps.codecov-flags.outputs.flags }},project | |
REPORT_NAME: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-project | |
REPORT_PATH: artifacts/coverage-project.xml | |
run: | | |
if [ ! -f codecov.sh ]; then | |
n=0 | |
until [ "$n" -ge 5 ] | |
do | |
if curl --max-time 30 -L https://codecov.io/bash --output codecov.sh; then | |
break | |
fi | |
n=$((n+1)) | |
sleep 15 | |
done | |
fi | |
if [ -f codecov.sh ]; then | |
n=0 | |
until [ "$n" -ge 5 ] | |
do | |
if bash codecov.sh -R $(pwd) -n "${REPORT_NAME}" -f "${REPORT_PATH}" -F "${REPORT_FLAGS}"; then | |
break | |
fi | |
n=$((n+1)) | |
sleep 15 | |
done | |
fi | |
- name: Upload Tests Code Coverage | |
if: always() | |
shell: bash | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
REPORT_FLAGS: ${{ steps.codecov-flags.outputs.flags }},tests | |
REPORT_NAME: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-tests | |
REPORT_PATH: artifacts/coverage-tests.xml | |
run: | | |
if [ ! -f codecov.sh ]; then | |
n=0 | |
until [ "$n" -ge 5 ] | |
do | |
if curl --max-time 30 -L https://codecov.io/bash --output codecov.sh; then | |
break | |
fi | |
n=$((n+1)) | |
sleep 15 | |
done | |
fi | |
if [ -f codecov.sh ]; then | |
n=0 | |
until [ "$n" -ge 5 ] | |
do | |
if bash codecov.sh -R $(pwd) -n "${REPORT_NAME}" -f "${REPORT_PATH}" -F "${REPORT_FLAGS}"; then | |
break | |
fi | |
n=$((n+1)) | |
sleep 15 | |
done | |
fi | |
- name: Upload Logs | |
if: always() | |
uses: actions/upload-artifact@main | |
with: | |
name: runtests-${{ runner.os }}-py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}.log | |
path: artifacts/runtests-*.log | |
Windows: | |
if: false | |
runs-on: windows-2019 | |
needs: Pre-Commit | |
timeout-minutes: 40 | |
strategy: | |
fail-fast: false | |
max-parallel: 3 | |
matrix: | |
python-version: | |
- "3.10" | |
salt-version: | |
- 3006.1 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Nox | |
run: | | |
python -m pip install --upgrade pip | |
pip install nox | |
- name: Install Test Requirements | |
shell: bash | |
env: | |
SALT_REQUIREMENT: salt==${{ matrix.salt-version }} | |
EXTRA_REQUIREMENTS_INSTALL: Cython | |
run: | | |
export PATH="/C/Program Files (x86)/Windows Kits/10/bin/10.0.18362.0/x64;$PATH" | |
nox --force-color -e tests-3 --install-only | |
- name: Unit Test | |
shell: bash | |
env: | |
SALT_REQUIREMENT: salt==${{ matrix.salt-version }} | |
SKIP_REQUIREMENTS_INSTALL: YES | |
run: | | |
export PATH="/C/Program Files (x86)/Windows Kits/10/bin/10.0.18362.0/x64;$PATH" | |
nox --force-color -e tests-3 -- -vv tests/unit | |
- name: Integration Test | |
if: false | |
shell: bash | |
env: | |
SALT_REQUIREMENT: salt==${{ matrix.salt-version }} | |
SKIP_REQUIREMENTS_INSTALL: YES | |
run: | | |
export PATH="/C/Program Files (x86)/Windows Kits/10/bin/10.0.18362.0/x64;$PATH" | |
nox --force-color -e tests-3 -- -vv tests/integration | |
- name: Create CodeCov Flags | |
if: always() | |
id: codecov-flags | |
run: | | |
echo ::set-output name=flags::$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-2019', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))") | |
- name: Upload Project Code Coverage | |
if: always() | |
shell: bash | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
REPORT_FLAGS: ${{ steps.codecov-flags.outputs.flags }},project | |
REPORT_NAME: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-project | |
REPORT_PATH: artifacts/coverage-project.xml | |
run: | | |
if [ ! -f codecov.sh ]; then | |
n=0 | |
until [ "$n" -ge 5 ] | |
do | |
if curl --max-time 30 -L https://codecov.io/bash --output codecov.sh; then | |
break | |
fi | |
n=$((n+1)) | |
sleep 15 | |
done | |
fi | |
if [ -f codecov.sh ]; then | |
n=0 | |
until [ "$n" -ge 5 ] | |
do | |
if bash codecov.sh -R $(pwd) -n "${REPORT_NAME}" -f "${REPORT_PATH}" -F "${REPORT_FLAGS}"; then | |
break | |
fi | |
n=$((n+1)) | |
sleep 15 | |
done | |
fi | |
- name: Upload Tests Code Coverage | |
if: always() | |
shell: bash | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
REPORT_FLAGS: ${{ steps.codecov-flags.outputs.flags }},tests | |
REPORT_NAME: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-tests | |
REPORT_PATH: artifacts/coverage-tests.xml | |
run: | | |
if [ ! -f codecov.sh ]; then | |
n=0 | |
until [ "$n" -ge 5 ] | |
do | |
if curl --max-time 30 -L https://codecov.io/bash --output codecov.sh; then | |
break | |
fi | |
n=$((n+1)) | |
sleep 15 | |
done | |
fi | |
if [ -f codecov.sh ]; then | |
n=0 | |
until [ "$n" -ge 5 ] | |
do | |
if bash codecov.sh -R $(pwd) -n "${REPORT_NAME}" -f "${REPORT_PATH}" -F "${REPORT_FLAGS}"; then | |
break | |
fi | |
n=$((n+1)) | |
sleep 15 | |
done | |
fi | |
- name: Upload Logs | |
if: always() | |
uses: actions/upload-artifact@main | |
with: | |
name: runtests-${{ runner.os }}-py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}.log | |
path: artifacts/runtests-*.log | |
macOS: | |
if: false | |
runs-on: macOS-10.15 | |
needs: Pre-Commit | |
timeout-minutes: 40 | |
strategy: | |
fail-fast: false | |
max-parallel: 3 | |
matrix: | |
python-version: | |
- "3.10" | |
salt-version: | |
- 3006.1 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Nox | |
run: | | |
python -m pip install --upgrade pip | |
pip install nox | |
- name: Install Test Requirements | |
env: | |
SALT_REQUIREMENT: salt==${{ matrix.salt-version }} | |
run: | | |
nox --force-color -e tests-3 --install-only | |
- name: Unit Test | |
env: | |
SALT_REQUIREMENT: salt==${{ matrix.salt-version }} | |
SKIP_REQUIREMENTS_INSTALL: YES | |
run: | | |
nox --force-color -e tests-3 -- -vv tests/unit | |
- name: Integration Test | |
if: false | |
env: | |
SALT_REQUIREMENT: salt==${{ matrix.salt-version }} | |
SKIP_REQUIREMENTS_INSTALL: YES | |
run: | | |
nox --force-color -e tests-3 -- -vv tests/integration | |
- name: Create CodeCov Flags | |
if: always() | |
id: codecov-flags | |
run: | | |
echo ::set-output name=flags::$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-10.15', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))") | |
- name: Upload Project Code Coverage | |
if: always() | |
shell: bash | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
REPORT_FLAGS: ${{ steps.codecov-flags.outputs.flags }},project | |
REPORT_NAME: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-project | |
REPORT_PATH: artifacts/coverage-project.xml | |
run: | | |
if [ ! -f codecov.sh ]; then | |
n=0 | |
until [ "$n" -ge 5 ] | |
do | |
if curl --max-time 30 -L https://codecov.io/bash --output codecov.sh; then | |
break | |
fi | |
n=$((n+1)) | |
sleep 15 | |
done | |
fi | |
if [ -f codecov.sh ]; then | |
n=0 | |
until [ "$n" -ge 5 ] | |
do | |
if bash codecov.sh -R $(pwd) -n "${REPORT_NAME}" -f "${REPORT_PATH}" -F "${REPORT_FLAGS}"; then | |
break | |
fi | |
n=$((n+1)) | |
sleep 15 | |
done | |
fi | |
- name: Upload Tests Code Coverage | |
if: always() | |
shell: bash | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
REPORT_FLAGS: ${{ steps.codecov-flags.outputs.flags }},tests | |
REPORT_NAME: ${{ runner.os }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}-tests | |
REPORT_PATH: artifacts/coverage-tests.xml | |
run: | | |
if [ ! -f codecov.sh ]; then | |
n=0 | |
until [ "$n" -ge 5 ] | |
do | |
if curl --max-time 30 -L https://codecov.io/bash --output codecov.sh; then | |
break | |
fi | |
n=$((n+1)) | |
sleep 15 | |
done | |
fi | |
if [ -f codecov.sh ]; then | |
n=0 | |
until [ "$n" -ge 5 ] | |
do | |
if bash codecov.sh -R $(pwd) -n "${REPORT_NAME}" -f "${REPORT_PATH}" -F "${REPORT_FLAGS}"; then | |
break | |
fi | |
n=$((n+1)) | |
sleep 15 | |
done | |
fi | |
- name: Upload Logs | |
if: always() | |
uses: actions/upload-artifact@main | |
with: | |
name: runtests-${{ runner.os }}-py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}.log | |
path: artifacts/runtests-*.log |