-
-
Notifications
You must be signed in to change notification settings - Fork 994
64 lines (59 loc) · 2.06 KB
/
test.yml
File metadata and controls
64 lines (59 loc) · 2.06 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
name: Tests
on:
pull_request:
push:
branches:
- master
permissions:
contents: read
jobs:
rails:
strategy:
fail-fast: false
matrix:
tests:
- id: general
name: General
command: test
- id: system
name: System
command: test:system
- id: avo-without-pro
name: Avo (without Pro)
command: "test test/*/avo"
name: Rails tests ${{ matrix.tests.name }}
runs-on: ubuntu-24.04
env:
RUBYGEMS_VERSION: "4.0.8"
# Fail hard when Toxiproxy is not running to ensure all tests (even Toxiproxy optional ones) are passing
REQUIRE_TOXIPROXY: true
TOXIPROXY_LISTEN_HOST: "0.0.0.0"
TOXIPROXY_UPSTREAM: "search:9200"
REQUIRE_AVO_PRO: ${{ github.secret_source != 'None' && matrix.tests.id != 'avo-without-pro' }}
AVO_LICENSE_KEY: ${{ secrets.AVO_LICENSE_KEY }}
BUNDLE_PACKAGER__DEV: ${{ secrets.BUNDLE_PACKAGER__DEV }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup rubygems.org
uses: ./.github/actions/setup-rubygems.org
with:
ruby-version: "4.0.2"
rubygems-version: "4.0.8"
install-avo-pro: ${{ matrix.tests.id != 'avo-without-pro' }}
- name: Tests ${{ matrix.tests.name }}
id: test-all
run: bin/rails ${{ matrix.tests.command }}
- name: Save capybara screenshots
if: ${{ failure() && steps.test-all.outcome == 'failure' }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: capybara-screenshots-${{ matrix.tests.name }}
path: tmp/capybara
if-no-files-found: ignore
- name: Upload coverage to Codecov
if: matrix.tests.id != 'avo-without-pro' && (success() || failure())
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}