-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Petoss 531 create GitHub actions for validating pr in ruby sdk repo
- Loading branch information
Vignesh Kennadi
committed
Sep 9, 2024
1 parent
d865b1b
commit 450318d
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Ruby Build, Lint and Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
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 |