Skip to content

Commit

Permalink
Test only Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi committed Apr 4, 2024
1 parent 8bc8f9a commit 76bfd06
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 35 deletions.
22 changes: 14 additions & 8 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ runs:
- name: Cache PIP Packages
uses: actions/cache@v4
id: cache
if: github.event_name != 'schedule'
if: github.event_name != 'schedule' && False
with:
path: ${{ steps.os.outputs.pip-cache }}
key: ${{ inputs.os }}-pip-test-${{ inputs.python-version }}-${{ hashFiles('**/requirements.txt', '**/constraints.txt') }}-${{ steps.os.outputs.date }}
Expand All @@ -62,16 +62,22 @@ runs:
- name: Install Python dependencies
run: |
pwd
python3 -V
which python3
python3 -m venv $RUNNER_TEMP/venv
ls -lah "$RUNNER_TEMP/venv/Scripts"
echo "creating venv"
python3 -m venv "venv"
echo "venv created"
ls -lah "venv"
ls -lah "venv/Scripts"
echo "$GITHUB_PATH"
cat "$GITHUB_PATH"
echo "$RUNNER_TEMP/venv/bin" >> "$GITHUB_PATH"
echo "$RUNNER_TEMP\\venv\\Scripts" >> "$GITHUB_PATH"
echo "venv/bin" >> "$GITHUB_PATH"
echo "venv/Scripts" >> "$GITHUB_PATH"
cat "$GITHUB_PATH"
export PATH="$RUNNER_TEMP/venv/bin:$RUNNER_TEMP\\Scripts:$PATH"
echo "$PATH"
export PATH="venv/bin:venv/Scripts:$PATH"
echo "$PATH"
which python3
# inspect pip cache
Expand Down Expand Up @@ -108,12 +114,12 @@ runs:
python/test/files/update_expectations.sh
git status
if ! git diff --exit-code || [[ $(git ls-files -o --exclude-standard | wc -l) -gt 0 ]]
if ! git diff --exit-code || [[ $(git ls-files -o --exclude-standard --exclude venv | wc -l) -gt 0 ]]
then
# we only upload the changed files if we can find zip
if which zip
then
(git diff --name-only && git ls-files -o --exclude-standard) | xargs zip changed-expectations.zip
(git diff --name-only && git ls-files -o --exclude-standard --exclude venv) | xargs zip changed-expectations.zip
exit 1
fi
fi
Expand Down
29 changes: 2 additions & 27 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,6 @@ jobs:
git diff --exit-code
shell: bash

test-mac:
name: "Test macOS"
uses: "./.github/workflows/test-os.yml"
with:
os: '["macos-11", "macos-12", "macos-13", "macos-14"]'
python-version: '["3.10", "3.11", "3.12", "installed"]'
include: >
[
{"os": "macos-11", "python-version": "3.7"},
{"os": "macos-11", "python-version": "3.8"},
{"os": "macos-11", "python-version": "3.9"},
{"os": "macos-12", "python-version": "3.8"},
{"os": "macos-12", "python-version": "3.9"},
{"os": "macos-13", "python-version": "3.8"},
{"os": "macos-13", "python-version": "3.9"},
]
test-lnx:
name: "Test Ubuntu"
uses: "./.github/workflows/test-os.yml"
with:
os: '["ubuntu-20.04", "ubuntu-22.04"]'
python-version: '["3.8", "3.9", "3.10", "3.11", "3.12", "installed"]'
include: '[{"os": "ubuntu-20.04", "python-version": "3.7"}]'

test-win:
name: "Test Windows"
uses: "./.github/workflows/test-os.yml"
Expand All @@ -68,7 +43,7 @@ jobs:

publish:
name: "Publish"
needs: [test-mac, test-lnx, test-win]
needs: [test-win]
# we run the action from this branch whenever we can (when it runs in our repo's context)
if: >
! cancelled() &&
Expand All @@ -82,7 +57,7 @@ jobs:

config-deploy:
name: Configure Deployment
needs: [test-mac, test-lnx, test-win]
needs: [test-win]
# do not build or deploy on forked repositories
if: github.repository_owner == 'EnricoMi'
runs-on: ubuntu-latest
Expand Down

0 comments on commit 76bfd06

Please sign in to comment.