Skip to content

Commit 29ee418

Browse files
committed
Add GitHub Actions CI/CD pipeline
Implement automated testing and quality checks for pull requests and main branch pushes. The pipeline includes: - Dependency installation with uv - Security vulnerability scanning with uv-secure - Code linting with ruff - Code formatting verification with ruff - Test execution with pytest - Coverage reporting All checks must pass before code can be merged, ensuring consistent quality standards.
1 parent f8c36b1 commit 29ee418

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/Build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Copyright 2025 Diffblue
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Build
16+
17+
on:
18+
pull_request:
19+
branches:
20+
- "**"
21+
push:
22+
branches:
23+
- "main"
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-small
28+
steps:
29+
- uses: actions/checkout@v5
30+
31+
- uses: astral-sh/setup-uv@v7
32+
with:
33+
version: "0.9.5"
34+
35+
- name: Install Project Dependencies
36+
run: uv sync --locked --all-extras --all-groups
37+
38+
- name: Check for Vulnerabilities
39+
run: uv tool run uv-secure --disable-cache
40+
41+
- name: Run Linter
42+
run: uvx ruff check --preview --output-format=github
43+
44+
- name: Run Formatter
45+
run: uvx ruff format --preview --output-format=github
46+
47+
- name: Run Tests with Coverage
48+
run: uv run coverage run -m pytest -v
49+
50+
- name: Coverage Report
51+
run: uv run coverage report

0 commit comments

Comments
 (0)