-
Notifications
You must be signed in to change notification settings - Fork 5
71 lines (60 loc) · 2.07 KB
/
ci.yml
File metadata and controls
71 lines (60 loc) · 2.07 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
65
66
67
68
69
70
71
---
name: CI
permissions:
pull-requests: write
contents: read
on:
push:
branches:
- main
pull_request:
branches-ignore:
- 'dependabot/**/**'
types: [opened, synchronize, reopened, edited, ready_for_review]
concurrency:
group: "${{ github.head_ref || github.ref }}-${{ github.workflow }}"
cancel-in-progress: true
jobs:
lint-test:
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
name: Lint and Test
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: PR Conventional Commit Validation
if: |
github.event_name == 'pull_request' &&
(github.event.action == 'opened' ||
github.event.action == 'synchronize' ||
github.event.action == 'reopened' ||
github.event.action == 'edited') &&
github.actor != 'dependabot[bot]' &&
github.actor != 'dependabot-preview[bot]'
uses: ytanikin/pr-conventional-commits@1.4.0
with:
task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert"]'
custom_labels: '{"feat": "enhancement", "fix": "bug", "docs": "documentation", "test": "test", "ci": "CI/CD", "refactor": "refactor", "perf": "performance", "chore": "chore", "revert": "revert", "wip": "WIP"}'
add_scope_label: 'false'
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Build uv lock file
run: uv lock
- name: Install dependencies
run: uv sync
#- name: setup gitleaks
# run: make setup-gitleaks
#- name: run gitleaks
# run: make run-gitleaks
- name: check code formatting & vulnerability detection
run: make check-python-nofix
- name: Cleanup residue file
run: make clean