forked from primer/view_components
-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (60 loc) · 1.76 KB
/
Copy pathtest-performance.yml
File metadata and controls
65 lines (60 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: test-performance
on:
pull_request:
merge_group:
branches:
- main
types:
- checks_requested
permissions: {}
concurrency:
group: test-performance-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
FERRUM_PROCESS_TIMEOUT: 30
jobs:
load-matrix:
name: Load test matrix
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- id: set-matrix
run: echo "matrix=$(cat .github/version-matrix.json | jq -c .)" >> $GITHUB_OUTPUT
performance:
name: Performance (${{ matrix.label }})
runs-on: ubuntu-latest
needs: load-matrix
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.load-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: ruby/setup-ruby@6aaa311d81eba98ae12eaffbcb63296ace0efcde # v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
cache-version: ${{ matrix.rails_version }}-${{ matrix.ruby_version }}
- name: Build
run: |
bundle config unset deployment
bundle install --jobs 4 --retry 3
env:
RUBY_VERSION: ${{ matrix.ruby_version }}
RAILS_VERSION: ${{ matrix.rails_version }}
- name: Test
run: |
bundle exec rake test:performance
env:
RUBY_VERSION: ${{ matrix.ruby_version }}
RAILS_VERSION: ${{ matrix.rails_version }}