Skip to content

Commit

Permalink
Merge pull request #309 from XeroAPI/PETOSS-531-Create-GitHub-actions…
Browse files Browse the repository at this point in the history
…-for-validating-PR-in-Ruby-SDK-repo_new

Petoss 531 create GitHub actions for validating pr in ruby sdk repo
  • Loading branch information
vigneshk-tw authored Sep 9, 2024
2 parents d865b1b + 3f7c21d commit 517631c
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build-test-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Ruby Build, Lint and Test

on:
push:

jobs:
build-test-lint:
runs-on: ubuntu-latest

steps:
- name: Checkout xero-ruby repo
uses: actions/checkout@v4
with:
repository: XeroAPI/xero-ruby
path: xero-ruby

- name: Set up Ruby environment
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true

- name: Install dependencies
run: bundle install
working-directory: xero-ruby

- name: Compile Build
run: find . -name "*.rb" | xargs -n 1 ruby -c > /dev/null 2>&1 || exit 1
working-directory: xero-ruby

- name: Lint Code
run: bundle exec rubocop
working-directory: xero-ruby

- name: Run Tests
run: bundle exec rake spec
working-directory: xero-ruby

0 comments on commit 517631c

Please sign in to comment.