-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update Python version to 3.11 in run-pytest.yaml
- Loading branch information
1 parent
b81601f
commit e4959bb
Showing
1 changed file
with
17 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,31 @@ | ||
name: Run Pytest | ||
name: Python package | ||
|
||
on: [push, pull_request] | ||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
# This is the version of the action for setting up Python, not the Python version. | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# Semantic version range syntax or exact version of a Python version | ||
python-version: '3.11' | ||
# Optional - x64 or x86 architecture, defaults to x64 | ||
architecture: 'x64' | ||
# You can test your matrix by printing the current Python version | ||
- name: Display Python version | ||
run: python -c "import sys; print(sys.version)" | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt install libespeak-dev | ||
sudo apt-get install python-dateutil | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=200 --statistics --ignore=E501,E402 | ||
pip install -r requirements.txt | ||
- name: Test with pytest | ||
run: | | ||
pytest | ||
pip install pytest pytest-cov | ||
pytest tests --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html |