-
Notifications
You must be signed in to change notification settings - Fork 15
30 lines (28 loc) · 928 Bytes
/
ci.yml
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
name: CI
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
if: |
!(github.event_name == 'push' && contains(github.event.head_commit.message, '[skip ci]'))
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Install poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install dependencies
run: /home/runner/.local/bin/poetry install
- name: Run tests
run: /home/runner/.local/bin/poetry run pytest --cov=preston --cov-report=xml
- name: Upload coverage
run: bash <(curl -s https://codecov.io/bash)