Skip to content

Preserve enum values on nested/inline entity properties #141

Preserve enum values on nested/inline entity properties

Preserve enum values on nested/inline entity properties #141

Workflow file for this run

name: Memory Profile
on:
pull_request:
workflow_dispatch:
inputs:
iterations:
description: 'Number of iterations'
required: false
default: '5'
permissions:
contents: read
pull-requests: write
issues: write
jobs:
memory-profile:
name: Memory Profiling
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '4.0'
bundler-cache: true
- name: Run memory benchmark
id: benchmark
env:
ITERATIONS: ${{ github.event.inputs.iterations || '5' }}
run: |
echo "report<<EOF" >> $GITHUB_OUTPUT
bundle exec ruby benchmark/memory_profile.rb --markdown >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Find existing comment
uses: peter-evans/find-comment@v4
id: find-comment
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: '## Memory Profile Report'
- name: Post or update PR comment
uses: peter-evans/create-or-update-comment@v5
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
${{ steps.benchmark.outputs.report }}
---
<sub>Generated by Memory Profile workflow • Commit: ${{ github.sha }}</sub>
edit-mode: replace
- name: Upload report artifact
uses: actions/upload-artifact@v7
with:
name: memory-profile-report
path: |
benchmark/memory_report.md
if-no-files-found: ignore
- name: Check for memory leaks
run: |
bundle exec ruby -e "
require 'json'
require_relative 'benchmark/memory_profile'
benchmark = MemoryBenchmark.new(format: :json)
benchmark.run
result = JSON.parse(benchmark.report)
if result['summary']['potential_leak']
puts '::warning::Potential memory leak detected!'
exit 1
else
puts 'No memory leak detected.'
end
"