Skip to content

Update third-party tests #144

Update third-party tests

Update third-party tests #144

name: Update third-party tests
on:
schedule:
- cron: "0 3 * * 2" # 2 = Tuesday
workflow_dispatch:
concurrency:
group: update-third-party-tests-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Update third-party tests
run: |
scripts/update_third_party_tests.sh
# smoelius: Need a better way to order Go tags. The current approach of ordering them by
# "creatordate" doesn't work.
# scripts/update_go_third_party_tests.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/ci
env:
TESTS: third_party_0 third_party_1
BLESS: "1"
# smoelius: After blessing the new output, verify that all tests pass. Note that this only
# runs on `ubuntu-latest`, so it is not as thorough as running the CI workflow.
- uses: ./.github/actions/ci
env:
TESTS: third_party_0 third_party_1 trycmd other ci
- name: Require that a snapshot changed
id: snapshot
run: |
set +e
git diff --quiet -- '*.stdout'
status=$?
set -e
if [ "$status" -eq 1 ]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
elif [ "$status" -ne 0 ]; then
exit "$status"
fi
- name: Create pull request
if: steps.snapshot.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v8
with:
title: "Update third-party tests"
body: "Clicking 'Ready for review' will run CI checks on this PR."
commit-message: "Update third-party tests"
branch-suffix: random
draft: true