yandex-music-api/.github/workflows/codecov.yml

40 行
1.0 KiB
YAML

name: Codecov
on:
push:
branches:
- master
jobs:
pytest:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-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 dependencies
run: |
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
pip install pipenv
pipenv install --dev --deploy --system
shell: bash
- name: Test with pytest and generate coverage
run: |
pytest -v --cov=./
shell: bash
- name: Submit coverage
run: |
if [ "$CODECOV_TOKEN" != "" ]; then
codecov -F github -t $CODECOV_TOKEN --name "${{ matrix.os }}-${{ matrix.python-version }}"
fi
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
shell: bash