Skip to content

feat: store macaw results #5

feat: store macaw results

feat: store macaw results #5

Workflow file for this run

name: Run macaw tests
on: [push, pull_request]
jobs:
macaw-tests:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test checkout
run: ls -la && cd code && ls -la
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install macaw
run: pip install git+https://github.com/Devlin-Moyer/macaw.git@main numpy==1.26.4
- name: Run macaw
id: macaw-run
run: |
TEST_RESULTS=$(python code/test/macawTests.py)
echo "results=$TEST_RESULTS" >> $GITHUB_OUTPUT
- name: Rename output file
env:
PR_NUMBER: ${{ github.event.number }}
run: mv macaw_dead_end_and_duplicate_test_results.csv data/macawResults/PR$PR_NUMBER.csv
- name: Auto-commit results
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: memote-bot
commit_message: "chore: add macaw test result"
file_pattern: PR$PR_NUMBER.csv
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Post comment
uses: NejcZdovc/comment-pr@v2
with:
file: "commentsFromTests.md"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
TEST_RESULTS: ${{steps.macaw-run.outputs.results}}
GH_ACTION_RUN: ${{github.run_id}}