forked from Aunsiels/pyformlang
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.77 KB
/
ci_master.yml
File metadata and controls
64 lines (55 loc) · 1.77 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# This workflow is for master branch only. It sets up python, lints with several analyzers,
# runs tests, collects test coverage, makes a coverage comment and creates a coverage badge.
name: Build master
on:
push:
branches: "master"
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with pylint
run: |
pylint pyformlang || true
- name: Lint with pycodestyle
run: |
pycodestyle pyformlang || true
- name: Check with pyright
run: |
pyright --stats pyformlang
- name: Test with pytest
run: |
pytest --showlocals -v pyformlang
- name: Build coverage file
run: |
pytest pyformlang --junitxml=pytest.xml --cov=pyformlang | tee ./pytest-coverage.txt
- name: Make coverage comment
uses: MishaKav/pytest-coverage-comment@main
id: coverageComment
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml
default-branch: master
- name: Create coverage Badge
uses: schneegans/dynamic-badges-action@v1.0.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 135f01c630063c3e69d999a2edf59fdb
filename: coverage_pyformlang.json
label: Coverage Report
message: ${{ steps.coverageComment.outputs.coverage }}
color: ${{ steps.coverageComment.outputs.color }}
namedLogo: python