mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Fix package testing on windows
This commit is contained in:
parent
bc7d4b861f
commit
589e9bc505
4 changed files with 45 additions and 30 deletions
2
.github/workflows/build-deps-ci-action.yml
vendored
2
.github/workflows/build-deps-ci-action.yml
vendored
|
@ -276,6 +276,7 @@ jobs:
|
|||
if: ${{ inputs.kind == 'windows' }}
|
||||
env:
|
||||
USE_S3_CACHE: 'false'
|
||||
GITHUB_WORKSPACE: 'C:\Windows\Temp\testing'
|
||||
timeout-minutes: 90
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
@ -312,6 +313,7 @@ jobs:
|
|||
python3 -c "import os; os.makedirs('artifacts', exist_ok=True)"
|
||||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz
|
||||
|
||||
- name: Set up Python ${{ inputs.python-version }}
|
||||
if: steps.nox-dependencies-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/setup-python@v5
|
||||
|
|
|
@ -117,11 +117,17 @@ jobs:
|
|||
|
||||
steps:
|
||||
|
||||
- name: Set up Python ${{ inputs.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "${{ inputs.python-version }}"
|
||||
|
||||
- name: "Throttle Builds"
|
||||
shell: bash
|
||||
run: |
|
||||
t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t"
|
||||
|
||||
|
||||
- name: "Set `TIMESTAMP` environment variable"
|
||||
shell: bash
|
||||
run: |
|
||||
|
@ -134,24 +140,13 @@ jobs:
|
|||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-${{ inputs.arch }}-${{ inputs.pkg-type }}
|
||||
path: artifacts/pkg/
|
||||
path: ./artifacts/pkg/
|
||||
|
||||
- name: Download Onedir Tarball as an Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
path: artifacts/
|
||||
|
||||
- name: Set up Python ${{ inputs.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "${{ inputs.python-version }}"
|
||||
|
||||
- name: Install Nox
|
||||
run: |
|
||||
python3 -m pip install 'nox==${{ inputs.nox-version }}'
|
||||
env:
|
||||
PIP_INDEX_URL: https://pypi.org/simple
|
||||
path: ./artifacts/
|
||||
|
||||
- name: Decompress Onedir Tarball
|
||||
shell: bash
|
||||
|
@ -160,9 +155,13 @@ jobs:
|
|||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
|
||||
- name: List Packages
|
||||
- name: Install Nox
|
||||
run: |
|
||||
tree artifacts/pkg/
|
||||
python3 -m pip install 'nox==${{ inputs.nox-version }}'
|
||||
env:
|
||||
PIP_INDEX_URL: https://pypi.org/simple
|
||||
|
||||
- run: python3 --version
|
||||
|
||||
- name: Download nox.windows.${{ inputs.arch }}.tar.* artifact for session ${{ inputs.nox-session }}
|
||||
uses: actions/download-artifact@v4
|
||||
|
@ -171,27 +170,41 @@ jobs:
|
|||
|
||||
- name: Decompress .nox Directory
|
||||
run: |
|
||||
nox --force-color -e decompress-dependencies -- windows ${{ inputs.arch }}
|
||||
7z.exe x nox.windows.${{ inputs.arch }}.tar.gz -so | 7z x -aoa -si -ttar -o"d:/"
|
||||
|
||||
- name: Rename salt directory
|
||||
run: ren ./salt ./salt-bak
|
||||
#- name: Find and remove pyc files
|
||||
# shell: bash
|
||||
# run: |
|
||||
# find . -name '*.pyc' -delete
|
||||
# find .nox -name '*.pyc' -delete
|
||||
|
||||
- name: List Packages
|
||||
run: |
|
||||
dir d:/
|
||||
dir .
|
||||
dir artifacts/
|
||||
dir artifacts/pkg
|
||||
dir .nox/ci-test-onedir/Scripts
|
||||
|
||||
- name: Check onedir python
|
||||
continue-on-error: true
|
||||
run: |
|
||||
artifacts/salt/Scripts/python.exe --version
|
||||
|
||||
- run: Get-Item .nox/ci-test-onedir/Scripts/python.exe | Select-Object -ExpandProperty Target
|
||||
|
||||
- name: Check nox python
|
||||
continue-on-error: true
|
||||
run: |
|
||||
.nox/ci-test-onedir/Scripts/python.exe --version
|
||||
|
||||
- name: Show System Info
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO_ONLY: "1"
|
||||
SKIP_INITIAL_ONEDIR_FAILURES: "1"
|
||||
SKIP_INITIAL_GH_ACTIONS_FAILURES: "1"
|
||||
SKIP_CODE_COVERAGE: "1"
|
||||
OUTPUT_COLUMNS: "190"
|
||||
GITHUB_ACTIONS_PIPELINE: "1"
|
||||
RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1"
|
||||
TOOLS_DISTRO_SLUG: "${{ inputs.distro-slug }}"
|
||||
PYTHONUTF8: "1"
|
||||
run: |
|
||||
nox --force-color -f noxfile.py -e "${{ inputs.nox-session }}-pkgs" -- '${{ matrix.tests-chunk }}'
|
||||
nox --force-color -f noxfile.py -e "${{ inputs.nox-session }}-pkgs" -- '${{ matrix.tests-chunk }}' --log-cli-level=debug
|
||||
|
||||
- name: Run Package Tests
|
||||
env:
|
||||
|
|
|
@ -46,7 +46,7 @@ $WINDOWS_DIR = "$PROJECT_DIR\pkg\windows"
|
|||
$NSIS_DIR = "$WINDOWS_DIR\nsis"
|
||||
$BUILDENV_DIR = "$WINDOWS_DIR\buildenv"
|
||||
$NSIS_BIN = "$( ${env:ProgramFiles(x86)} )\NSIS\makensis.exe"
|
||||
$SALT_DEP_URL = "https://repo.saltproject.io/windows/dependencies/64"
|
||||
$SALT_DEP_URL = "https://github.com/saltstack/salt-windows-deps/raw/refs/heads/main/ssm/64/"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Script Start
|
||||
|
|
|
@ -46,7 +46,7 @@ $WINDOWS_DIR = "$PROJECT_DIR\pkg\windows"
|
|||
$NSIS_DIR = "$WINDOWS_DIR\nsis"
|
||||
$BUILDENV_DIR = "$WINDOWS_DIR\buildenv"
|
||||
$NSIS_BIN = "$( ${env:ProgramFiles(x86)} )\NSIS\makensis.exe"
|
||||
$SALT_DEP_URL = "https://repo.saltproject.io/windows/dependencies/64"
|
||||
$SALT_DEP_URL = "https://github.com/saltstack/salt-windows-deps/raw/refs/heads/main/ssm/64/"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Script Start
|
||||
|
|
Loading…
Add table
Reference in a new issue