-
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (78 loc) · 2.2 KB
/
test.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Test
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
rubocop:
name: Rubocop
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Ruby 3.1
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
bundler-cache: true
- name: Lint
run: bundle exec rake rubocop
rspec:
name: Rspec ruby-${{ matrix.ruby }}
runs-on: ubuntu-22.04
needs: rubocop
strategy:
matrix:
ruby: ["2.7", "3.0", "3.1"]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Test
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: be263ef9412dc65a7aa8dfb6e8162d5c7cfb3307fae0a444cde9dd6ca6f52848
ALLURE_ENVIRONMENT: ruby-${{ matrix.ruby }}
with:
coverageCommand: bundle exec rake test:coverage
coverageLocations: coverage/coverage.json:simplecov
- name: Upload report
uses: actions/upload-artifact@v3
with:
name: allure-results
path: "*/reports/allure-results/*"
retention-days: 1
report:
name: Allure report
runs-on: ubuntu-22.04
needs: rspec
if: github.actor == 'andrcuns'
steps:
- name: Download allure-results
uses: actions/download-artifact@v3
with:
name: allure-results
- name: Publish allure report
uses: andrcuns/[email protected]
env:
GOOGLE_CLOUD_CREDENTIALS_JSON: ${{ secrets.GOOGLE_CLOUD_CREDENTIALS_JSON }}
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ALLURE_JOB_NAME: rspec
with:
storageType: gcs
resultsGlob: "*/reports/allure-results/*"
bucket: allure-test-reports
prefix: allure-ruby/$GITHUB_REF
updatePr: description
summary: behaviors
copyLatest: true
ignoreMissingResults: false
summaryTableType: ascii