Skip to content

PR Checks for trunk-merge/pr-3790/b0ae7db9-2559-4f74-8706-a3527cfbb59a #1246

PR Checks for trunk-merge/pr-3790/b0ae7db9-2559-4f74-8706-a3527cfbb59a

PR Checks for trunk-merge/pr-3790/b0ae7db9-2559-4f74-8706-a3527cfbb59a #1246

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:
push:
branches:
- trunk-merge/**
jobs:
test:
name: run tests to validate pr
runs-on: ubuntu-latest
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: trunk install
uses: trunk-io/trunk-action/install@v1
with:
tools: gh
- name: download generator
run: |
gh release download --pattern='*.gz' --output mq.gz --clobber
tar -xf mq.gz
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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/*) ]]; 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 }}