-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (89 loc) · 3.39 KB
/
default.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
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Perform Checks
on:
pull_request:
branches:
- main
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY_NAME: 'action-demo'
permissions: write-all
jobs:
standard-checks:
name: Perform Standard Checks
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Dependencies
run: python3 -m pip install -r requirements.txt
- name: Run Pylint
uses: dciborow/[email protected]
with:
github_token: ${{ secrets.github_token }}
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
reporter: github-pr-review
# Change reporter level if you need.
# GitHub Status Check won't become failure with warning.
level: warning
glob_pattern: "sources/**/*.py"
- name: Behave Tests
run: coverage run --source="sources" -m behave tests/qualification_tests
- name: Generate XML coverage report
run: coverage xml
- name: Get Coverage
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
thresholdAll: 0.9
- name: Retrieve Release Version
id: version
run: echo "VERSION=$(python3 setup.py --version)" >> "$GITHUB_ENV"
- name: Add Badges
# You may pin to the exact commit or the version.
# uses: wow-actions/add-badges@43f2c1eaecfb2596b89a8136a3fbda4f18d1d188
uses: wow-actions/[email protected]
env:
repo_url: ${{ github.event.repository.html_url }}
repo_name: ${{ github.event.repository.name }}
repo_owner: ${{ github.event.repository.owner.login }}
with:
# Your GitHub token for authentication.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# The badges to add with JSON format
badges: |
[
{
"badge": "https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge",
"alt": "MIT License",
"link": "${{ env.repo_url }}/blob/main/LICENSE"
},
{
"badge": "https://img.shields.io/badge/Language-Python-blue?style=for-the-badge&logo=python",
"alt": "Language",
"link": "https://www.python.org/"
},
{
"badge": "https://img.shields.io/badge/PRs-Welcome-brightgreen.svg?style=for-the-badge",
"alt": "PRs Welcome",
"link": "${{ env.repo_url }}/pulls"
},
{
"badge": "https://img.shields.io/badge/TestPyPi-${{ env.VERSION }}-brightgreen.svg?style=for-the-badge",
"alt": "TestPyPi ${{ env.VERSION }}",
"link": "https://test.pypi.org/project/${{ env.REPOSITORY_NAME }}/"
},
{
"badge": "https://img.shields.io/badge/PyPi-${{ env.VERSION }}-brightgreen.svg?style=for-the-badge",
"alt": "PyPi ${{ env.VERSION }}",
"link": "https://pypi.org/project/${{ env.REPOSITORY_NAME }}/"
}
]
# Path and file name to add badges
path: README.md
# Should center align the badges
center: false