Skip to content

Commit 97a1f3d

Browse files
authored
Github Actions | Tests (#10)
* Add uv * Update lock check * Fix requirements installation * Fix workdir in uv-build * Fix python version and deps version * Fix tools and uv lock * Fix bandit * Fix pyprojct * Fix codestyle tools * Fix flake8 config * remove verbosity of bandit * Dependency Updates * Mypy fixes * Build matrix * Add uv to readme * Store scenarios to file * Do not store hash if no workdir * argparse * args handling and cli implementation * Improve cli args handling * CLI improvements * Add tests & fix cli * Tests gh action * add pytest coverage * Fix artifact naming * Add badge in readme * rabbit suggestion
1 parent 3ffffd3 commit 97a1f3d

File tree

6 files changed

+155
-14
lines changed

6 files changed

+155
-14
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Run Tests"
2+
description: "Runs pytest"
3+
4+
5+
inputs:
6+
python-version:
7+
description: "Python version used for the test run. This is only used for output file naming to avoid conflicts."
8+
required: true
9+
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: "Run tests"
14+
shell: bash
15+
run: uv run --dev pytest --junitxml=test-results.xml --cov=rogue --cov-report=xml
16+
17+
- name: "Upload Test Results"
18+
uses: actions/upload-artifact@v4
19+
with:
20+
name: junit-results-${{ inputs.python-version }}
21+
path: test-results.xml
22+
23+
- name: "Upload Coverage Results"
24+
uses: actions/upload-artifact@v4
25+
with:
26+
name: coverage-report-${{ inputs.python-version }}
27+
path: coverage.xml

.github/workflows/build.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
name: Build Matrix
1+
name: Build
22

33
on:
44
pull_request:
5+
push:
6+
branches:
7+
- main
58
workflow_dispatch:
69

710
jobs:
811
build:
912
runs-on: ubuntu-latest
10-
strategy:
11-
matrix:
12-
python-version:
13-
- "3.10"
14-
- "3.11"
15-
- "3.12"
16-
- "3.13"
17-
1813
steps:
1914
- name: Checkout Repository
2015
uses: actions/checkout@v4
@@ -25,11 +20,7 @@ jobs:
2520
- name: Setup Python
2621
uses: actions/setup-python@v5
2722
with:
28-
python-version: ${{ matrix.python-version }}
23+
python-version-file: ".python-version"
2924

3025
- name: Run uv build
3126
uses: ./.github/actions/uv-build
32-
33-
# TODO:
34-
# - name: Run tests
35-
# run: uv run pytest

.github/workflows/test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version:
16+
- "3.10"
17+
- "3.11"
18+
- "3.12"
19+
- "3.13"
20+
21+
steps:
22+
- name: Checkout Repository
23+
uses: actions/checkout@v4
24+
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v5
27+
28+
- name: Setup Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Run tests
34+
uses: ./.github/actions/run-tests
35+
with:
36+
python-version: ${{ matrix.python-version }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Rogue - The AI Agent Evaluator
22

33
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4+
![Tests](https://github.com/qualifire-dev/rogue-private/actions/workflows/test.yml/badge.svg?branch=main)
45

56
Rogue is a powerful, tool designed to evaluate the performance, compliance, and reliability of AI agents. It pits a dynamic `EvaluatorAgent` against your agent using Google's A2A protocol, testing it with a range of scenarios to ensure it behaves exactly as intended.
67

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ dev = [
2323
"flake8==7.3.0",
2424
"mypy==1.16.1",
2525
"pytest>=8.4.1",
26+
"pytest-cov>=6.2.1",
2627
"pytest-mock>=3.14.1",
2728
]

0 commit comments

Comments
 (0)