Merge pull request #29 from Lyncs-API/develop #73
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 runs test | |
name: tests | |
on: | |
pull_request: | |
branches: | |
- "main" | |
- "master" | |
- "develop" | |
push: | |
branches: | |
- "main" | |
- "master" | |
jobs: | |
test-minimal: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
py-version: | |
- 3.x | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Set up Python ${{ matrix.py-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.py-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest | |
- name: Install via pip | |
run: | | |
pip install -e . | |
- name: Run tests | |
run: | | |
pytest | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
py-version: | |
- 3.7 | |
- 3.8 | |
- 3.x | |
os: | |
- ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Set up Python ${{ matrix.py-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.py-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install lyncs_setuptools | |
- name: Install via pip | |
run: | | |
sudo pip install -e .[all] | |
- name: Run tests | |
run: | | |
coverage run --rcfile=setup.cfg -m pytest | |
- name: Coverage report | |
run: | | |
coverage report | |
- name: Upload Coverage report | |
if: ${{ matrix.py-version == '3.x' }} | |
run: | | |
coverage xml | |
export CODECOV_TOKEN="${{ secrets.CODECOV_TOKEN }}" | |
bash <(curl -s https://codecov.io/bash) -f ./coverage.xml -n $(lyncs_setuptools name) |