implement GitHub action for integration regeneration (#3659)

* modify readme

* Regenerate integration tests

* actually run the integration tests

* fix python version

* add diff check

* remove colima

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Robert Brennan 2024-08-29 17:46:41 -04:00 committed by GitHub
parent 09cfcfbee9
commit ece8fef739
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,20 +5,35 @@ on:
workflow_dispatch:
jobs:
update-readme:
regenerate_integration_tests:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install poetry via pipx
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install Python dependencies using Poetry
run: poetry install --without evaluation,llama-index
- name: Build Environment
run: make build
- name: Add newline to README
# TODO: change this to regenerate the tests once this workflow is verified as working
run: echo "hello world" >> README.md
- name: Regenerate integration tests
run: ./tests/integration/regenerate.sh
- name: Commit changes
run: |
if git diff --quiet --exit-code; then
echo "No changes to commit"
exit 0
fi
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .