Skip to content

Commit 450318d

Browse files
author
Vignesh Kennadi
committed
Petoss 531 create GitHub actions for validating pr in ruby sdk repo
1 parent d865b1b commit 450318d

File tree

1 file changed

+39
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)