Skip to content

PR Checks for 119963/merge #170690

PR Checks for 119963/merge

PR Checks for 119963/merge #170690

Workflow file for this run

# trunk-ignore-all(semgrep/yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha.third-party-action-not-pinned-to-commit-sha)
name: PR Testing
run-name: PR Checks for ${{ github.ref_name }}
on:
pull_request: {}
push:
branches:
- trunk-merge/**
jobs:
test:
name: run tests to validate pr
runs-on: ubicloud
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: robinraju/[email protected]
with:
repository: trunk-io/mergequeue-tool
latest: true
tarBall: true
preRelease: true
extract: true
- name: Determine is_merge
id: check_is_merge
run: |
if [[ ${GITHUB_EVENT_NAME} == "push" && (${GITHUB_REF_NAME} == trunk-merge/* || ${GITHUB_REF_NAME} == trunk-merge-beta/*) || "${{ github.event.pull_request.title }}" == trunk-merge/* ]]; then
echo "on_merge=true" >> $GITHUB_OUTPUT
else
echo "on_merge=false" >> $GITHUB_OUTPUT
fi
- name: run tests
id: test
# only actually run the test if we're on the merge branch
# so we can simulate delay and flakiness
if: steps.check_is_merge.outputs.on_merge == 'true'
run: |
./mq test-sim
env:
IS_MERGE: ${{ steps.check_is_merge.outputs.on_merge }}