Merge pull request #578 from zendesk/update-readme #465
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
- "3.3" | |
- "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 |