Skip to content

Commit e19b2ae

Browse files
committed
Define CI workflow with Github Actinos
1 parent 8764fa5 commit e19b2ae

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/ruby.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Run Unit Tests
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
name: Test
15+
strategy:
16+
matrix:
17+
ruby-version: ['2.7', '3.0', '3.1']
18+
os: ['ubuntu-latest', 'macos-latest']
19+
runs-on: ${{ matrix.os }}
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Set up Ruby
24+
uses: ruby/setup-ruby@v1
25+
with:
26+
ruby-version: ${{ matrix.ruby-version }}
27+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
28+
- name: Run tests
29+
run: bundle exec rake test
30+
31+
test-with-system-lib:
32+
name: Test with system library
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- uses: actions/checkout@v3
37+
- name: Set up Ruby
38+
uses: ruby/setup-ruby@v1
39+
with:
40+
ruby-version: 3.1
41+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
42+
- name: Prepare libjsonnet
43+
run: sudo apt install libjsonnet-dev
44+
- name: Run tests
45+
run: env JSONNET_USE_SYSTEM_LIBRARIES=1 bundle exec rake test

0 commit comments

Comments
 (0)