-
Notifications
You must be signed in to change notification settings - Fork 183
57 lines (55 loc) · 1.39 KB
/
main.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
name: Test
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- spec_live
jobs:
test-and-lint:
name: Test and lint
runs-on: ubuntu-latest
strategy:
matrix:
ruby:
- "2.7"
- "3.0"
- "3.1"
- "3.2"
- "jruby-9.4"
steps:
- name: Checkout code
uses: zendesk/checkout@v2
- name: Set up Ruby
uses: zendesk/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ${{ matrix.ruby }}
- name: Test and Lint
run: |
bundle install
bundle exec rake
bundle exec rubocop
spec-live:
name: Spec live
if: github.repository == 'zendesk/zendesk_api_client_rb'
env:
SPEC_LIVE_USERNAME: ${{ secrets.SPEC_LIVE_USERNAME }}
SPEC_LIVE_PASSWORD: ${{ secrets.SPEC_LIVE_PASSWORD }}
SPEC_LIVE_ZENDESK_HOST: ${{ secrets.SPEC_LIVE_ZENDESK_HOST }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: zendesk/checkout@v2
- name: Set up Ruby
uses: zendesk/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 3.1
- name: spec:live
run: |
bundle install
bundle exec rake clean_live set_ci_credentials spec:live ||
bundle exec rake clean_live &&
bundle exec rspec spec/live --only-failures