Performance Tests #202
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: Performance Tests | |
on: | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: '0 9 * * 0' | |
workflow_dispatch: | |
jobs: | |
check_branch_changes: | |
runs-on: ubuntu-22.04 | |
outputs: | |
changed: ${{ steps.branch_change_output.outputs.has-new-commits }} | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7 | |
- name: check branch changes | |
id: branch_change_output | |
uses: adriangl/check-new-commits-action@e6471f4fda990ebdb3bf44726371e1ad45ac4d37 # tag v1.0.7 | |
with: | |
seconds: 604800 | |
branch: 'dev' | |
run_performance_tests: | |
runs-on: ubuntu-22.04 | |
needs: check_branch_changes | |
if: ${{ needs.check_branch_changes.outputs.changed == 'true' }} | |
defaults: | |
run: | |
working-directory: ./test/performance | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7 | |
with: | |
ref: 'main' | |
- uses: ruby/setup-ruby@f26937343756480a8cb3ae1f623b9c8d89ed6984 # tag v1.196.0 | |
with: | |
ruby-version: '3.3' | |
- run: bundle | |
- run: bundle exec script/runner -B | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7 | |
- run: bundle | |
- run: bundle exec script/runner -C -M > performance_results.md | |
- name: Save performance results | |
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # tag v4.3.4 | |
with: | |
name: performance-test-results-${{ matrix.ruby-version }} | |
path: ./test/performance/performance_results.md | |
- name: Slack results | |
uses: adrey/slack-file-upload-action@903be3678c88966c762193f06530c39178b44d68 # tag v1.0.5 | |
with: | |
token: ${{ secrets.RUBY_GITHUB_ACTIONS_BOT_WEBHOOK }} | |
path: ./test/performance/performance_results.md | |
channel: ruby-agent-notifications |