mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 11:06:56 +08:00
UnitTesting: install wheel; support py3.11; fix scripting for Windows (PowerShell commands) (#34)
This commit is contained in:
13
.github/workflows/Parameters.yml
vendored
13
.github/workflows/Parameters.yml
vendored
@@ -86,11 +86,12 @@ jobs:
|
|||||||
print('WARNING: support for Python 3.6 ended in 2021.12.23')
|
print('WARNING: support for Python 3.6 ended in 2021.12.23')
|
||||||
data = {
|
data = {
|
||||||
'python': {
|
'python': {
|
||||||
'3.6': { 'icon': '⚫', 'until': '2021.12.23' },
|
'3.6': { 'icon': '⚫', 'until': '2021.12.23' },
|
||||||
'3.7': { 'icon': '🔴', 'until': '2023.06.27' },
|
'3.7': { 'icon': '🔴', 'until': '2023.06.27' },
|
||||||
'3.8': { 'icon': '🟠', 'until': '2024.10' },
|
'3.8': { 'icon': '🟠', 'until': '2024.10' },
|
||||||
'3.9': { 'icon': '🟡', 'until': '2025.10' },
|
'3.9': { 'icon': '🟡', 'until': '2025.10' },
|
||||||
'3.10': { 'icon': '🟢', 'until': '2026.10' },
|
'3.10': { 'icon': '🟢', 'until': '2026.10' },
|
||||||
|
'3.11': { 'icon': '🟣', 'until': '2027.10' },
|
||||||
},
|
},
|
||||||
'sys': {
|
'sys': {
|
||||||
'ubuntu': { 'icon': '🐧', 'runs-on': 'ubuntu-latest', 'shell': 'bash' },
|
'ubuntu': { 'icon': '🐧', 'runs-on': 'ubuntu-latest', 'shell': 'bash' },
|
||||||
@@ -106,7 +107,7 @@ jobs:
|
|||||||
'runs-on': data['sys'][system]['runs-on'],
|
'runs-on': data['sys'][system]['runs-on'],
|
||||||
'shell': data['sys'][system]['shell'],
|
'shell': data['sys'][system]['shell'],
|
||||||
'pyicon': data['python'][version]['icon'],
|
'pyicon': data['python'][version]['icon'],
|
||||||
'python': version
|
'python': '3.11.0-alpha.3' if version == '3.11' else version
|
||||||
}
|
}
|
||||||
for system in systems
|
for system in systems
|
||||||
for version in (versions if system != 'msys2' else ['3.9'])
|
for version in (versions if system != 'msys2' else ['3.9'])
|
||||||
|
|||||||
17
.github/workflows/UnitTesting.yml
vendored
17
.github/workflows/UnitTesting.yml
vendored
@@ -64,26 +64,33 @@ jobs:
|
|||||||
- name: ⏬ Checkout repository
|
- name: ⏬ Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- if: matrix.system == 'msys2'
|
- name: '🟦 Setup MSYS2'
|
||||||
name: '🟦 Setup MSYS2'
|
if: matrix.system == 'msys2'
|
||||||
uses: msys2/setup-msys2@v2
|
uses: msys2/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
msystem: MINGW64
|
msystem: MINGW64
|
||||||
update: true
|
update: true
|
||||||
pacboy: python-pip:p
|
pacboy: python-pip:p
|
||||||
|
|
||||||
- if: matrix.system != 'msys2'
|
- name: 🐍 Setup Python ${{ matrix.python }}
|
||||||
name: 🐍 Setup Python ${{ matrix.python }}
|
if: matrix.system != 'msys2'
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python }}
|
python-version: ${{ matrix.python }}
|
||||||
|
|
||||||
- name: 🔧 Install dependencies
|
- name: 🔧 Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install -U pip
|
python -m pip install -U pip wheel
|
||||||
python -m pip install ${{ inputs.requirements }}
|
python -m pip install ${{ inputs.requirements }}
|
||||||
|
|
||||||
- name: ☑ Run unit tests
|
- name: ☑ Run unit tests
|
||||||
|
if: matrix.system == 'windows'
|
||||||
|
run: |
|
||||||
|
$PYTEST_ARGS = if ("${{ inputs.artifact }}".length -gt 0) { "--junitxml=TestReport.xml" } else { "" }
|
||||||
|
python -m pytest -rA ${{ inputs.unittest_directory }} $PYTEST_ARGS --color=yes
|
||||||
|
|
||||||
|
- name: ☑ Run unit tests
|
||||||
|
if: matrix.system != 'windows'
|
||||||
run: |
|
run: |
|
||||||
[ 'x${{ inputs.artifact }}' != 'x' ] && PYTEST_ARGS='--junitxml=TestReport.xml' || unset PYTEST_ARGS
|
[ 'x${{ inputs.artifact }}' != 'x' ] && PYTEST_ARGS='--junitxml=TestReport.xml' || unset PYTEST_ARGS
|
||||||
python -m pytest -rA ${{ inputs.unittest_directory }} $PYTEST_ARGS --color=yes
|
python -m pytest -rA ${{ inputs.unittest_directory }} $PYTEST_ARGS --color=yes
|
||||||
|
|||||||
Reference in New Issue
Block a user