Files
picard/.github/workflows/run-tests.yml
2019-11-26 16:41:15 +01:00

65 lines
1.9 KiB
YAML

name: Run tests
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: [3.5, 3.6, 3.7, 3.8]
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Check coding style
run: |
pip install flake8 isort
flake8 picard --count --show-source --statistics
isort --check-only --diff --recursive picard test
- name: Test with pytest
run: |
pip install pytest pytest-randomly pytest-cov
pytest --verbose --cov=picard --cov-report xml:coverage.xml test
- name: Submit code coverage to Codacy
if: env.CODACY_PROJECT_TOKEN
run: |
pip install codacy-coverage
python-codacy-coverage -r coverage.xml
pip-install: # Test whether a clean pip install from source works
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: [3.8]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install gettext (Linux)
if: runner.os == 'Linux'
run: sudo apt-get install gettext
- name: Install gettext (macOS)
if: runner.os == 'macOS'
run: |
brew install gettext
brew link gettext --force
- name: Run pip install .
run: |
python -m pip install --upgrade pip
pip install .