-
Notifications
You must be signed in to change notification settings - Fork 19
62 lines (61 loc) · 1.88 KB
/
check.yml
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
on:
pull_request:
push:
branches:
- main
jobs:
check:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
ruby: [ '2.7', '3.0', '3.1', '3.2', '3.3' ]
protocol: [ 'json', 'msgpack' ]
type: [ 'unit', 'acceptance' ]
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: 'Run ${{ matrix.type }} tests on ruby ${{ matrix.ruby }} (${{ matrix.protocol }} protocol)'
env:
PARALLEL_TEST_PROCESSORS: 2
RSPEC_RETRY: true
PROTOCOL: ${{ matrix.protocol }}
TEST_TYPE: ${{ matrix.type }}
RUBY_VERSION: ${{ matrix.ruby }}
run: |
sudo apt-get update
sudo apt-get install ca-certificates
mkdir junit
bundle exec parallel_rspec --prefix-output-with-test-env-number --first-is-1 -- spec/${{ matrix.type }}
- uses: actions/upload-artifact@v3
with:
path: |
junit/
coverage/
retention-days: 7
- name: Upload test results
if: always()
uses: ably/test-observability-action@v1
with:
server-url: 'https://test-observability.herokuapp.com'
server-auth: ${{ secrets.TEST_OBSERVABILITY_SERVER_AUTH_KEY }}
path: 'junit/'
- uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ruby-${{ matrix.ruby }}-${{ matrix.protocol }}-${{ matrix.type }}
parallel: true
finish:
needs: check
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true