FEAT: Add LibrAI 'Do Not Answer' Dataset #2686
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Builds the pyrit environment and runs all tests and pre-commit hooks | |
name: build_and_test | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
- "release/**" | |
workflow_dispatch: | |
concurrency: | |
# This ensures after each commit the old jobs are cancelled and the new ones | |
# run instead. | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
main-job: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python: ["3.10", "3.11", "3.12"] | |
package_name: ["pyrit"] | |
package_extras: ["dev", "all"] | |
runs-on: ${{ matrix.os }} | |
# EnricoMi/publish-unit-test-result-action@v2 requires the following permissions | |
permissions: | |
contents: read | |
issues: read | |
checks: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install setuptools and pip | |
run: pip install --upgrade setuptools pip | |
- name: Install PyRIT with pip | |
run: pip install .[${{ matrix.package_extras }}] | |
- name: Run unit tests with code coverage | |
run: make test-cov-xml | |
- name: Publish Pytest Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
files: '**/test-*.xml' | |
- name: Code Coverage Report | |
uses: irongut/[email protected] | |
with: | |
filename: coverage.xml | |
badge: true | |
fail_below_min: false | |
format: markdown | |
hide_branch_rate: false | |
hide_complexity: true | |
indicators: true | |
output: both | |
thresholds: '60 80' | |
- name: "Run pre-commit hooks" | |
run: pre-commit run --all-files |