Skip to content

Add testing matrix.

Add testing matrix. #7

Workflow file for this run

name: Ruby Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Execute Tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
ruby: ["2.7", "3.0", "3.1", "3.2", "3.3"]
runs-on: ${{ matrix.os }}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.6
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Retrieve bearer token
id: get_bearer_token
run: |
response=$(curl -X POST ${{secrets.OKTA_ACCESS_TOKEN_URL}}/connect/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=${{secrets.OKTA_CLIENT_ID}}&client_secret=${{secrets.OKTA_CLIENT_SECRET}}")
token=$(echo $response | jq -r '.access_token')
echo "BEARER_TOKEN=${token}" >> $GITHUB_ENV
- name: Build & test
run: |
gem install bundler:2.3.6
bundle config set --local path 'vendor/bundle'
bundle install
bundle exec rspec
env:
BEARER_TOKEN: ${{ env.BEARER_TOKEN }}