-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Regression | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install -y curl | ||
sudo apt install -y gcc-9 gcc-10 gcc-11 gcc-12 | ||
- name: Install CWhy | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install . | ||
- name: Generate current prompts | ||
run: python3 tests/regression.py --platform ubuntu --generate | ||
|
||
- name: Commit | ||
run: | | ||
git diff | test # There are no changes to the prompts. | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add tests/.regression | ||
git switch -c bot/regression/ubuntu | ||
git commit -m "[bot] Generate current state of CWhy prompts" | ||
git push origin --delete bot/regression/ubuntu | ||
git push origin bot/regression/ubuntu | ||
- name: Create pull request | ||
run: | | ||
curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{secrets.GITHUB_TOKEN}}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/plasma-umass/cwhy/pulls \ | ||
-d '{"title":"[bot] Generate current state of CWhy prompts","body":"Timestamp: ${{github.event.repository.updated_at}}","head":"bot/regression/ubuntu","base":"main"}' |