Skip to content

Commit

Permalink
Don't run tests on Windows or macOS...
Browse files Browse the repository at this point in the history
... since the installation of the outdated dependency fails on the
GitHub runners for some reason. This should be revisited or fixed by
supporting the latest library versions.
  • Loading branch information
lkubb committed Oct 4, 2024
1 parent 7741a61 commit 5a47c98
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 285 deletions.
2 changes: 0 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ max_salt_version: '3007'
no_saltext_namespace: false
os_support:
- Linux
- macOS
- Windows
package_name: telegram
project_name: telegram
python_requires: '3.8'
Expand Down
283 changes: 0 additions & 283 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,286 +140,3 @@ jobs:
name: exitstatus-${{ github.job }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}
path: exitstatus
if-no-files-found: error

Windows:
runs-on: windows-latest
timeout-minutes: 40

strategy:
fail-fast: false
max-parallel: 2
matrix:
include:
- {salt-version: "3006.9", python-version: "3.8"}
- {salt-version: "3007.1", python-version: "3.8"}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Download libeay32.dll
run: |
PY_LOC="$(which python.exe)"
export PY_LOC
echo "${PY_LOC}"
PY_DIR="$(dirname "${PY_LOC}")"
export PY_DIR
echo "${PY_DIR}"
curl https://repo.saltproject.io/windows/dependencies/64/libeay32.dll --output "${PY_DIR}/libeay32.dll"
ls -l "${PY_DIR}"
shell: bash

- 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: Test
shell: bash
env:
SALT_REQUIREMENT: salt==${{ matrix.salt-version }}
SKIP_REQUIREMENTS_INSTALL: true
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/
- name: Create CodeCov Flags
if: always()
id: codecov-flags
run: |
echo "flags=$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-latest', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))")" >> "$GITHUB_OUTPUT"
- name: Upload Project Code Coverage
if: always()
continue-on-error: true
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()
continue-on-error: true
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@v4
with:
name: runtests-${{ runner.os }}-py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}.log
path: artifacts/runtests-*.log

- name: Set Exit Status
if: always()
run: |
mkdir exitstatus
echo "${{ job.status }}" > exitstatus/${{ github.job }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}
- name: Upload Exit Status
if: always()
uses: actions/upload-artifact@v4
with:
name: exitstatus-${{ github.job }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}
path: exitstatus
if-no-files-found: error

macOS:
runs-on: macOS-latest
timeout-minutes: 40

strategy:
fail-fast: false
max-parallel: 2
matrix:
include:
- {salt-version: "3006.9", python-version: "3.9"}
- {salt-version: "3007.1", python-version: "3.10"}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
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: Test
env:
SALT_REQUIREMENT: salt==${{ matrix.salt-version }}
SKIP_REQUIREMENTS_INSTALL: true
run: |
nox --force-color -e tests-3 -- -vv tests/
- name: Create CodeCov Flags
if: always()
id: codecov-flags
run: |
echo "flags=$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-latest', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))")" >> "$GITHUB_OUTPUT"
- name: Upload Project Code Coverage
if: always()
continue-on-error: true
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()
continue-on-error: true
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@v4
with:
name: runtests-${{ runner.os }}-py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}.log
path: artifacts/runtests-*.log

- name: Set Exit Status
if: always()
run: |
mkdir exitstatus
echo "${{ job.status }}" > exitstatus/${{ github.job }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}
- name: Upload Exit Status
if: always()
uses: actions/upload-artifact@v4
with:
name: exitstatus-${{ github.job }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}
path: exitstatus
if-no-files-found: error

0 comments on commit 5a47c98

Please sign in to comment.