-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 986 Bytes
/
action.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
31
32
33
34
35
36
name: 'Test and build a Python application'
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10.6'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint source and tests
run: |
python -m pylint src
python -m pylint tests
- name: Test
run: python -m pytest tests
- name: Compute coverage
run: |
coverage run --data-file .coverage/data -m pytest tests
coverage html --data-file .coverage/data -d .coverage/html
coverage xml --data-file .coverage/data -o .coverage/xml
genbadge coverage -i .coverage/xml -o .badges/coverage-badge.svg