From ece8fef73937add02602f5a29425c80a23f4e897 Mon Sep 17 00:00:00 2001 From: Robert Brennan Date: Thu, 29 Aug 2024 17:46:41 -0400 Subject: [PATCH] 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] --- .../regenerate_integration_tests.yml | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/regenerate_integration_tests.yml b/.github/workflows/regenerate_integration_tests.yml index 98aa5f40c1..0940b657ee 100644 --- a/.github/workflows/regenerate_integration_tests.yml +++ b/.github/workflows/regenerate_integration_tests.yml @@ -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 .