-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (49 loc) · 1.31 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Test
on:
pull_request:
paths:
- '.github/workflows/test.yaml'
- 'poetry.lock'
- 'rsserpent_plugin_bilibili/**'
- 'tests/**'
push:
branches:
- 'master'
paths:
- '.github/workflows/test.yaml'
- 'poetry.lock'
- 'rsserpent_plugin_bilibili/**'
- 'tests/**'
tags-ignore:
- '**'
workflow_dispatch:
jobs:
run:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: |
~/.cache/pip
.venv
key: ${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
- name: "Setup Poetry"
run: |
pip install --upgrade pip
pip install --user poetry
poetry install
- name: "Generate Coverage Report"
run: poetry run pytest --cov --cov-report=xml -n auto
# - name: "Upload to Codecov.io"
# if: github.repository == 'creedowl/rsserpent-plugin-bilibili' && github.event_name != 'pull_request'
# uses: codecov/codecov-action@v2
# with:
# fail_ci_if_error: true