-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (45 loc) · 1.33 KB
/
ci.yml
File metadata and controls
50 lines (45 loc) · 1.33 KB
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
name: ci
# Run this workflow every time a new commit pushed to your repository
on:
- push
- pull_request
jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
ci:
# Set the type of machine to run on
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version}}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry pytest coverage
make install
- name: Lint flake8
run: |
make lint
env:
DEFAULT_BRANCH: master
- name: Run pytest
run:
make test
- name: Generate coverage report
run : |
poetry run coverage run -m pytest
- name: Update test coverage on codeclimate
uses: paambaati/codeclimate-action@v2.7.4
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
DEFAULT_BRANCH: master
with:
coverageCommand: poetry run coverage xml