Performance Tests #124
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@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # tag v3.5.0 | |
- name: check branch changes | |
id: branch_change_output | |
uses: adriangl/check-new-commits-action@6556947ca20c2047ed733894258186619b84d282 # tag v1.0.6 | |
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@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # tag v3.5.0 | |
with: | |
ref: 'main' | |
- uses: ruby/setup-ruby@7d546f4868fb108ed378764d873683f920672ae2 # tag v1.149.0 | |
with: | |
ruby-version: '3.2' | |
- run: bundle | |
- run: script/runner -B | |
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # tag v3.5.0 | |
- run: bundle | |
- run: script/runner -C -M > performance_results.md | |
- name: Save performance results | |
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # tag v3.1.2 | |
with: | |
name: performance-test-results | |
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 |