actionpack: Fix helper and fragment_cache_key block to optional #1549
Workflow file for this run
This file contains 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: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: {} | |
permissions: | |
contents: read | |
jobs: | |
syntax_check: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
bundler-cache: true | |
- name: 'Install dependencies' | |
run: 'gem install rbs' | |
- name: 'Test syntax check' | |
run: 'rbs parse gems/**/*.rbs' | |
test_on_changed_gems: | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
bundler-cache: true | |
- name: Run bin/setup | |
run: bin/setup | |
- name: Get changed gems | |
id: changes | |
run: | | |
END_MARKER="$(uuidgen)" | |
echo "gems<<${END_MARKER}" >> "$GITHUB_OUTPUT" | |
gh pr diff '${{ github.event.number }}' --name-only | \ | |
grep '^gems/' | \ | |
awk -F / '{printf "%s/%s/%s\n", $1, $2, $3}' | \ | |
sort -u | \ | |
tee -a "$GITHUB_OUTPUT" | |
echo "${END_MARKER}" >> "$GITHUB_OUTPUT" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run test on changed gems | |
if: steps.changes.outputs.gems | |
run: | | |
cat <<EOD | xargs bin/test --verbose | |
${{ steps.changes.outputs.gems }} | |
EOD | |
test_all_gems: | |
if: github.event_name != 'pull_request' | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
bundler-cache: true | |
- name: Run bin/setup | |
run: bin/setup | |
- name: Run test on all gems | |
run: bin/test --all --verbose |