Skip to content

New translate service: Promt #226

New translate service: Promt

New translate service: Promt #226

Workflow file for this run

# This workflow will install Python dependencies and run tests with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Pytest
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test-py35:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.5
uses: actions/setup-python@v2
with:
python-version: "3.5.4"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python3 setup.py install
- name: Test with pytest
run: |
pytest --cov-config=.coveragerc --cov-report xml:coverage.xml --cov=translatepy -vvs tests/
- name: Upload Coverage report
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
test-py37:
runs-on: ubuntu-20.04
needs: test-py35
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: "3.7.1"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python3 setup.py install
- name: Test with pytest
run: |
pytest -vvs
test-py39:
runs-on: ubuntu-20.04
needs: test-py37
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python3 setup.py install
- name: Test with pytest
run: |
pytest -vvs
test-py310:
runs-on: ubuntu-20.04
needs: test-py39
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python3 setup.py install
- name: Test with pytest
run: |
pytest -vvs tests/