Add tests for python code (#2759)

* add tests for python code

* ruff format
This commit is contained in:
Hare Sudhan
2024-04-27 12:38:14 -05:00
committed by GitHub
parent 58496ee330
commit 82fc8d41cc
22 changed files with 612 additions and 156 deletions
+10 -4
View File
@@ -21,10 +21,13 @@ jobs:
cache: "poetry"
- name: Install dependencies
run: poetry install --no-interaction --no-root
run: poetry install --no-interaction
- name: validate the format of atomics tests against the spec
run: poetry run python atomic_red_team/runner.py validate
run: poetry run python runner.py validate
working-directory: atomic_red_team
env:
PYTHONPATH: ${{ github.workspace }}
upload:
runs-on: ubuntu-latest
@@ -61,8 +64,11 @@ jobs:
run: poetry install --no-interaction --no-root
- name: save labels and reviewers into a file.
run: |
poetry run python atomic_red_team/runner.py generate-labels --pr '${{steps.get_pr_number.outputs.result}}' --token ${{ secrets.GITHUB_TOKEN }}
poetry run python runner.py generate-labels --pr '${{steps.get_pr_number.outputs.result}}' --token ${{ secrets.GITHUB_TOKEN }}
working-directory: atomic_red_team
env:
PYTHONPATH: ${{ github.workspace }}
- uses: actions/upload-artifact@v4
with:
name: labels.json
path: pr/
path: pr/