Skip to content

Commit 019aab1

Browse files
Add github actions for CI (#8)
* Add github actions for CI * Ran builidifier
1 parent 9465e27 commit 019aab1

File tree

3 files changed

+33
-4
lines changed

3 files changed

+33
-4
lines changed

.github/workflows/tests.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
test-suite:
13+
name: "Test Suite"
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
fail-fast: false # Don't cancel all jobs if one fails.
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Run Setup
23+
run: cd ${{ github.workspace }} && bin/setup
24+
- name: Run Bazel Tests
25+
run: cd ${{ github.workspace }} && bin/test-suite

ruby/private/bundle/def.bzl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ def install_bundler(runtime_ctx, bundler_version):
116116
def bundle_install(runtime_ctx, previous_result):
117117
cwd = runtime_ctx.ctx.path(".")
118118
bundler_args = [
119-
"install", "-V",
119+
"install",
120+
"-V",
120121
"--standalone",
121122
"--gemfile={}".format(runtime_ctx.ctx.attr.gemfile.name),
122123
"--jobs=10", # run a few jobs to ensure no gem install is blocking another
@@ -136,7 +137,10 @@ def bundle_install(runtime_ctx, previous_result):
136137

137138
# Creates a directory and place any executables from the gem there.
138139
result = run_bundler(runtime_ctx, [
139-
"binstubs", "--all", "--path", "{}".format(BUNDLE_BIN_PATH)
140+
"binstubs",
141+
"--all",
142+
"--path",
143+
"{}".format(BUNDLE_BIN_PATH),
140144
], previous_result)
141145
if result.return_code:
142146
fail("bundle binstubs failed: %s%s" % (result.stdout, result.stderr))
@@ -203,7 +207,7 @@ def _ruby_bundle_impl(ctx):
203207

204208
# 2. Generate a Gemfile.lock file if one isn't provided
205209
if not runtime_ctx.ctx.attr.gemfile_lock:
206-
result = set_bundler_config(runtime_ctx, result, has_lock=False)
210+
result = set_bundler_config(runtime_ctx, result, has_lock = False)
207211
result = bundle_install(runtime_ctx, result)
208212

209213
# 3. Set Bundler config in the .bundle/config file

ruby/private/sdk.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def rules_ruby_select_sdk(version = "host"):
3232
"jruby-9.3.6.0",
3333
]
3434

35-
for v in sorted(supported_versions, reverse=True):
35+
for v in sorted(supported_versions, reverse = True):
3636
if v.startswith(version):
3737
supported_version = v
3838
break

0 commit comments

Comments
 (0)