Skip to content

Commit 3105b7e

Browse files
committed
feat: Addded CI pipelines for dev branches and PR
1 parent 3b97860 commit 3105b7e

4 files changed

Lines changed: 60 additions & 26 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Static Code Analysis, runs when push to feature/**, feat/**, fix/** branches.
2+
3+
name: Dev branch validations
4+
5+
on:
6+
push:
7+
branches:
8+
- "feature/**"
9+
- "feat/**"
10+
- "fix/**"
11+
12+
jobs:
13+
static-code-analysis:
14+
uses: ./.github/workflows/ci/static-code-analysis.yml
15+
with:
16+
coverage_artifact: false
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Static Code Analysis, called when PR to main or push to feature/**, feat/**, fix/** branches.
2+
3+
name: Static Code Analysis
4+
on:
5+
workflow_call:
6+
inputs:
7+
coverage_artifact:
8+
required: true
9+
type: boolean
10+
11+
jobs:
12+
static-code-analysis:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v5
19+
20+
- name: Run Static Code Analysis
21+
run: uvx pre-commit run --all-files --show-diff-on-failure --color=always
22+
23+
- name: Run unit tests (with coverage report)
24+
if: ${{ inputs.coverage_artifact }}
25+
run: uv run pytest --cov=./src --cov-report=xml --cov-report=term
26+
27+
- name: Run unit tests (console-only coverage)
28+
if: ${{ !inputs.coverage_artifact }}
29+
run: uv run pytest --cov=./src --cov-report=term-missing
30+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Static Code Analysis and test validation workflow. Runs only on pull requests targeting the main branch.
2+
3+
name: Pull Requests Validations
4+
5+
on:
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
static-code-analysis:
12+
uses: ./.github/workflows/ci/static-code-analysis.yml
13+
with:
14+
coverage_artifact: true

.github/workflows/static-code-analysis.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)