"text" problems: 1 #289
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
name: QT-application | |
on: | |
push: | |
branches: | |
- '**' # matches every branch | |
pull_request: | |
branches: | |
- '**' # matches every branch | |
env: | |
PYTHONPATH: ./src | |
jobs: | |
flake8: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.10.11 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.10.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r requirements-dev.txt | |
- 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. black defaults to 88 characters | |
flake8 . --exclude src/ui/*, --count --exit-zero --max-complexity=18 --max-line-length=120 --statistics | |
test-core: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.10.11 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.10.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r requirements-dev.txt | |
- name: Test with pytest | |
run: | | |
python -m pytest tests_core_atomistic --cov=src/core_atomistic --cov-report=xml --cov-report=term-missing | |
test-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.10.11 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.10.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r requirements-dev.txt | |
- name: Test with pytest | |
run: | | |
python -m pytest tests --cov=src --cov-report=xml --cov-report=term-missing --ignore=tests/gui4dft_opengl | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV }} | |
files: coverage.xml | |
flags: unittests | |
env_vars: OS,PYTHON | |
fail_ci_if_error: true | |
name: codecov-umbrella | |
path_to_write_report: ./coverage/codecov_report.txt | |
verbose: true | |
test-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.10.11 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.10.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r requirements-dev.txt | |
- name: Test with pytest | |
run: | | |
python -m pytest tests --color=yes --cov=src/core_atomistic --cov=src/src_gui4dft --cov-report=xml --cov-report=term-missing --ignore=tests/gui4dft_opengl | |
test-mac: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.10.11 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.10.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r requirements-dev.txt | |
- name: Test with pytest | |
run: | | |
python -m pytest tests --color=yes --cov=src/core_atomistic --cov=src/src_gui4dft --cov-report=xml --cov-report=term-missing --ignore=tests/gui4dft_opengl |