Skip to content

Commit 517631c

Browse files
authored
Merge pull request #309 from XeroAPI/PETOSS-531-Create-GitHub-actions-for-validating-PR-in-Ruby-SDK-repo_new
Petoss 531 create GitHub actions for validating pr in ruby sdk repo
2 parents d865b1b + 3f7c21d commit 517631c

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Ruby Build, Lint and Test
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build-test-lint:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout xero-ruby repo
12+
uses: actions/checkout@v4
13+
with:
14+
repository: XeroAPI/xero-ruby
15+
path: xero-ruby
16+
17+
- name: Set up Ruby environment
18+
uses: ruby/setup-ruby@v1
19+
with:
20+
ruby-version: '3.0'
21+
bundler-cache: true
22+
23+
- name: Install dependencies
24+
run: bundle install
25+
working-directory: xero-ruby
26+
27+
- name: Compile Build
28+
run: find . -name "*.rb" | xargs -n 1 ruby -c > /dev/null 2>&1 || exit 1
29+
working-directory: xero-ruby
30+
31+
- name: Lint Code
32+
run: bundle exec rubocop
33+
working-directory: xero-ruby
34+
35+
- name: Run Tests
36+
run: bundle exec rake spec
37+
working-directory: xero-ruby

0 commit comments

Comments
 (0)