Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate jenkins CI to GH CI #93

Merged
merged 7 commits into from
Jun 24, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Ruby-ci

on:
push:
branches:
- master
pull_request:
branches:
- master

env:
ACCOUNT_ID: ${{ secrets.ACCOUNT_ID }}
API_KEY: ${{ secrets.API_KEY }}

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.4.2']
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest release is https://github.com/ruby/setup-ruby/tree/v1.180.1. Why can not we use that?

with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rspec --format RspecJunitFormatter --out test_results/rspec.xml --format progress
pmallampati-sift marked this conversation as resolved.
Show resolved Hide resolved

run_integration_tests:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' }}
strategy:
matrix:
ruby-version: [ '2.4.2' ]
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: |
bundle check
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change it to bundle check || bundle install according to circleci config.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove bundle check and bundle install.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jlin-sift Removed check/install from test step.

bundle install
bundle exec ruby test_integration_app/main.rb
Loading