-
Notifications
You must be signed in to change notification settings - Fork 41
45 lines (45 loc) · 1.49 KB
/
python.yaml
File metadata and controls
45 lines (45 loc) · 1.49 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
---
name: Python Checks for Pull Requests
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
merge_group:
types: [checks_requested]
jobs:
python:
runs-on: ubuntu-latest
steps:
- name: Install OS packages
# libkrb5-dev is required for gssapi dependency installation (krb5-config command)
run: |
sudo apt-get -y update
sudo apt-get install -y libkrb5-dev
- name: Check out repo
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Black Lint
uses: psf/black@8a737e727ac5ab2f1d4cf5876720ed276dc8dc4b # stable
- name: Setup python environment for flake8 check
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.9" # Same as in Dockerfile
- name: flake8 Lint
uses: py-actions/flake8@84ec6726560b6d5bd68f2a5bed83d62b52bb50ba # v2
- name: Run pytest with coverage
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
uv sync --dev
uv run pytest --cov=. --cov-report=xml:coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit-tests
files: coverage.xml
fail_ci_if_error: false