-
-
Notifications
You must be signed in to change notification settings - Fork 10
42 lines (41 loc) · 1.15 KB
/
validation.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Validation
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Format
run: |
black --check krcg tests
- name: Lint
run: |
ruff check
yamllint rulings
- name: Test
env:
LOCAL_CARDS: 1
run: |
coverage run -m pytest
coverage xml
- name: Upload coverage to Codacy
if: ${{ github.event_name == 'push' }}
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
python-codacy-coverage -r coverage.xml