Skip to content

Commit

Permalink
Add GitHub CI file
Browse files Browse the repository at this point in the history
  • Loading branch information
nicovank committed Sep 26, 2023
1 parent bf9d122 commit 1da1e58
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/regression.yml
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"}'

0 comments on commit 1da1e58

Please sign in to comment.