Skip to content

Commit

Permalink
Fix extract location
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Nov 5, 2024
1 parent 34cdc60 commit 42d28d6
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 40 deletions.
56 changes: 31 additions & 25 deletions .github/workflows/test-action-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,6 @@ jobs:
run: |
echo true
- name: Download nox.windows.${{ inputs.arch }}.tar.* artifact for session ${{ inputs.nox-session }}
uses: actions/download-artifact@v4
with:
name: nox-windows-${{ inputs.arch }}-${{ inputs.nox-session }}

- name: Set up Python ${{ inputs.gh-actions-python-version }}
uses: actions/setup-python@v5
with:
Expand All @@ -178,6 +173,11 @@ jobs:
env:
PIP_INDEX_URL: https://pypi.org/simple

- name: Download nox.windows.${{ inputs.arch }}.tar.* artifact for session ${{ inputs.nox-session }}
uses: actions/download-artifact@v4
with:
name: nox-windows-${{ inputs.arch }}-${{ inputs.nox-session }}

- name: Decompress .nox Directory
run: |
nox --force-color -e decompress-dependencies -- windows ${{ inputs.arch }}
Expand All @@ -188,6 +188,11 @@ jobs:
with:
name: testrun-changed-files.txt

- 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"
Expand All @@ -208,10 +213,10 @@ jobs:
SKIP_INITIAL_GH_ACTIONS_FAILURES: "1"
SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}"
COVERAGE_CONTEXT: ${{ inputs.distro-slug }}
run: |
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
-k "mac or darwin" --core-tests --slow-tests --suppress-no-test-exit-code \
--from-filenames=testrun-changed-files.txt
run: >
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} --
-k "mac or darwin" --core-tests --slow-tests --suppress-no-test-exit-code
"--from-filenames=testrun-changed-files.txt"
- name: Run Fast Tests
id: run-fast-tests
Expand All @@ -226,9 +231,9 @@ jobs:
SKIP_INITIAL_GH_ACTIONS_FAILURES: "1"
SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}"
COVERAGE_CONTEXT: ${{ inputs.distro-slug }}
run: |
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
-k "mac or darwin" --suppress-no-test-exit-code
run: >
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} --
-k "mac or darwin" --suppress-no-test-exit-code
- name: Run Slow Tests
id: run-slow-tests
Expand All @@ -243,9 +248,9 @@ jobs:
SKIP_INITIAL_GH_ACTIONS_FAILURES: "1"
SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}"
COVERAGE_CONTEXT: ${{ inputs.distro-slug }}
run: |
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --slow-tests
run: >
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} --
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --slow-tests
- name: Run Core Tests
id: run-core-tests
Expand All @@ -260,9 +265,9 @@ jobs:
SKIP_INITIAL_GH_ACTIONS_FAILURES: "1"
SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}"
COVERAGE_CONTEXT: ${{ inputs.distro-slug }}
run: |
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --core-tests
run: >
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} --
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --core-tests
- name: Run Flaky Tests
id: run-flaky-tests
Expand All @@ -277,9 +282,9 @@ jobs:
SKIP_INITIAL_GH_ACTIONS_FAILURES: "1"
SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}"
COVERAGE_CONTEXT: ${{ inputs.distro-slug }}
run: |
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --flaky-jail
run: >
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} --
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --flaky-jail
- name: Run Full Tests
id: run-full-tests
Expand All @@ -294,9 +299,9 @@ jobs:
SKIP_INITIAL_GH_ACTIONS_FAILURES: "1"
SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}"
COVERAGE_CONTEXT: ${{ inputs.distro-slug }}
run: |
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
--slow-tests --core-tests -k "mac or darwin"
run: >
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} --
--slow-tests --core-tests -k "mac or darwin"
- name: Combine Coverage Reports
if: always() && inputs.skip-code-coverage == false
Expand All @@ -306,11 +311,12 @@ jobs:
- name: Prepare Test Run Artifacts
id: download-artifacts-from-vm
if: always()
shell: bash
run: |
# Delete the salt onedir, we won't need it anymore and it will prevent
# from it showing in the tree command below
rmdir /S /Q artifacts/salt
rm -rf artifacts/salt*
tree -a artifacts
if [ "${{ inputs.skip-code-coverage }}" != "true" ]; then
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }}
fi
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test-packages-action-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,9 @@ jobs:
# --nox-session=${{ inputs.nox-session }}-pkgs --rerun-failures ${{ inputs.distro-slug }} -- ${{ matrix.tests-chunk }} \
# ${{ matrix.version && format('--prev-version={0}', matrix.version) || ''}}
- name: Run Package Tests
working-directory: 'D:\a\salt\salt'
env:
SKIP_REQUIREMENTS_INSTALL: "1"
PRINT_TEST_SELECTION: "0"
PRINT_TEST_PLAN_ONLY: "0"
PRINT_SYSTEM_INFO: "0"
RERUN_FAILURES: "1"
GITHUB_ACTIONS_PIPELINE: "1"
SKIP_INITIAL_GH_ACTIONS_FAILURES: "1"
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/test-packages-action-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,9 @@ jobs:

- name: Decompress .nox Directory
run: |
7z.exe x nox.windows.${{ inputs.arch }}.tar.gz -so | 7z x -aoa -si -ttar -o"d:/"
nox --force-color -e decompress-dependencies -- windows ${{ inputs.arch }}
#- name: Find and remove pyc files
# shell: bash
# run: |
# find . -name '*.pyc' -delete
# find .nox -name '*.pyc' -delete

- name: List Packages
- name: List Important Directories
run: |
dir d:/
dir .
Expand Down Expand Up @@ -219,8 +213,8 @@ jobs:
COVERAGE_CONTEXT: ${{ inputs.distro-slug }}
OUTPUT_COLUMNS: "190"
PYTHONUTF8: "1"
run: |
nox --force-color -f noxfile.py -e ${{ inputs.nox-session }}-pkgs -- ${{ matrix.tests-chunk }} \
run: >
nox --force-color -f noxfile.py -e ${{ inputs.nox-session }}-pkgs -- ${{ matrix.tests-chunk }}
${{ matrix.version && format('--prev-version={0}', matrix.version) || ''}}
- name: Prepare Test Run Artifacts
Expand All @@ -229,7 +223,7 @@ jobs:
run: |
# Delete the salt onedir, we won't need it anymore and it will prevent
# from it showing in the tree command below
rmdir /S /Qa rtifacts/salt
rmdir /S /Q artifacts/salt
tree -a artifacts
- name: Upload Test Run Artifacts
Expand Down
5 changes: 4 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,10 @@ def decompress_dependencies(session):
if not os.path.isabs(resolved_link):
# Relative symlinks, resolve them
resolved_link = os.path.join(scan_path, resolved_link)
if not os.path.exists(resolved_link):
prefix_check = False
if platform == "windows":
prefix_check = resolved_link.startswith("\\\\?")
if not os.path.exists(resolved_link) or prefix_check:
session.log("The symlink %r looks to be broken", resolved_link)
# This is a broken link, fix it
resolved_link_suffix = resolved_link.split(
Expand Down

0 comments on commit 42d28d6

Please sign in to comment.