build(deps): bump actions/upload-artifact from 6.0.0 to 7.0.0 #24
Workflow file for this run
This file contains hidden or 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
| name: CLI Integration Tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| schedule: | |
| # Run daily at 06:00 UTC | |
| - cron: "0 6 * * *" | |
| workflow_dispatch: | |
| inputs: | |
| mode: | |
| description: "Test mode: 'verify' to check against fixtures, 'record' to update fixtures" | |
| required: true | |
| default: "record" | |
| type: choice | |
| options: | |
| - verify | |
| - record | |
| jobs: | |
| cli-verify: | |
| name: CLI integration tests (verify) | |
| if: github.event_name != 'workflow_dispatch' || inputs.mode == 'verify' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install -U pip | |
| make requirements | |
| - name: Install package | |
| run: | | |
| pip install -e . | |
| - name: Verify CLI output against fixtures | |
| run: | | |
| bash tests/cli/test_cli.sh verify | |
| cli-record: | |
| name: CLI integration tests (record) | |
| if: github.event_name == 'workflow_dispatch' && inputs.mode == 'record' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install -U pip | |
| make requirements | |
| - name: Install package | |
| run: | | |
| pip install -e . | |
| - name: Record CLI fixtures | |
| run: | | |
| bash tests/cli/test_cli.sh record | |
| - name: Verify freshly recorded fixtures | |
| run: | | |
| bash tests/cli/test_cli.sh verify | |
| - name: Commit updated fixtures | |
| id: commit | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add tests/cli/expected/ | |
| if git diff --cached --quiet; then | |
| echo "No fixture changes detected." | |
| else | |
| # Create new branch for fixture updates | |
| BRANCH_NAME="update-cli-fixtures-$(date +%Y%m%d-%H%M%S)" | |
| git checkout -b $BRANCH_NAME | |
| git commit -m "Update CLI test fixtures [automated]" | |
| git push origin $BRANCH_NAME | |
| echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Pull Request | |
| if: steps.commit.outputs.branch_name | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh pr create \ | |
| --base master \ | |
| --head ${{ steps.commit.outputs.branch_name }} \ | |
| --title "Update CLI test fixtures [automated]" \ | |
| --body "This PR updates CLI test fixtures automatically. Please review and merge if the changes look correct." |