Skip to content

fixes and examples

fixes and examples #39

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build Ruby SDK
runs-on: ubuntu-latest
env:
BUNDLE_GITHUB__COM: "x-access-token:${{ secrets.CI_READ_COMMON }}"
steps:
- name: Checkout Code
uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
# We are not letting this step to run bundle install, we will do it later
bundler-cache: false
- name: Install dependencies
run: |
# Configure bundler with the required GitHub token
git config --global url."https://x-access-token:${{ secrets.CI_NPM_READ_ORG }}@github.com".insteadOf "https://github.com"
git clone https://${{ secrets.CI_NPM_READ_ORG }}:[email protected]/descope/mailmock.git
echo "Bundle install"
${{ secrets.GITHUB_TOKEN }} bundle install
- name: Run RSpec Test
run: bundle exec rspec spec/lib.descope
- name: Run Integration Test
run: bundle exec rspec spec/integration
- name: Build Gem
run: gem build descope.gemspec && gem install descope-*.gem
- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"