Remove .travis.yml #208
Workflow file for this run
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
name: Unittest | |
on: | |
push: | |
branches: | |
- master | |
- release/* | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
name: Test on python ${{ matrix.python-version }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: ['2.7', '3.7', '3.8', '3.9', '3.10', '3.11'] | |
os: [ubuntu-20.04, windows-2019, macos-12] | |
exclude: | |
- os: macos-12 | |
python-version: "2.7" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
if: matrix.python-version != '2.7' | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Ubuntu Python 2.7 | |
if: matrix.python-version == '2.7' && matrix.os == 'ubuntu-20.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends python2 python3-virtualenv | |
virtualenv -p python2 ${HOME}/cp27 | |
${HOME}/cp27/bin/python -m pip install -U pip | |
${HOME}/cp27/bin/python -m pip install -U setuptools wheel | |
echo "${HOME}/cp27/bin" >> $GITHUB_PATH | |
- name: Install Windows Python 2.7 | |
shell: cmd | |
if: matrix.python-version == '2.7' && matrix.os == 'windows-2019' | |
run: | | |
choco install wget --no-progress | |
wget -nv "https://www.python.org/ftp/python/2.7.18/python-2.7.18.amd64.msi" | |
start /wait msiexec.exe /passive /i python-2.7.18.amd64.msi /norestart /L*V "python_install.log" ADDLOCAL=ALL ALLUSERS=1 TARGETDIR=c:\python27 | |
type "python_install.log" | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip pytest pytest-cov codecov mock | |
pip install -r requirements.txt | |
- name: Run Tests | |
run: | | |
python -m pytest tests/ --cov=testbase --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
files: ./coverage.xml | |
flags: unittests | |
name: codecov-qtaf | |
path_to_write_report: ./coverage/codecov_report.txt | |
verbose: true |