-
Notifications
You must be signed in to change notification settings - Fork 91
45 lines (35 loc) · 1.22 KB
/
build-test-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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.2.0'
bundler-cache: true
- name: Install dependencies
run: bundle install
working-directory: xero-ruby
- name: Check Vulnerable Packages
run: bundle audit
working-directory: xero-ruby
- name: Check Outdated Packages
run: bundle outdated || true
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