Skip to content

Commit

Permalink
fix: Fixes various deprecations in test action (#425)
Browse files Browse the repository at this point in the history
- Removes deprecated managed_directories, see bazelbuild/bazel#15463
-  Fixes issue with @build_bazel_rules_nodejs, see bazel-contrib/rules_nodejs#2733 (comment)
- Sets test action to use Ubuntu-20.04 because it's needed for pkg_tar (bazelbuild/bazel#11554) since python2 was removed from Ubuntu after 20.04.
  • Loading branch information
amuramoto committed Jan 12, 2023
1 parent f5d8dbc commit a258373
Show file tree
Hide file tree
Showing 4 changed files with 3,764 additions and 2,785 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- push
jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
Expand Down
10 changes: 4 additions & 6 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@
workspace(
# How this workspace would be referenced with absolute labels from another workspace
name = "openapi-specification",
# Map the @npm bazel workspace to the node_modules directory.
# This lets Bazel use the same node_modules as other local tooling.
managed_directories = {"@npm": ["node_modules"]},
)

# Install the nodejs "bootstrap" package
# This provides the basic tools for running and packaging nodejs programs in Bazel
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# Fetch rules_nodejs so we can install our npm dependencies
http_archive(
http_archive( # https://github.com/bazelbuild/rules_nodejs/issues/2733#issuecomment-903111659
name = "build_bazel_rules_nodejs",
sha256 = "dd4dc46066e2ce034cba0c81aa3e862b27e8e8d95871f567359f7a534cccb666",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.1.0/rules_nodejs-3.1.0.tar.gz"],
sha256 = "e79c08a488cc5ac40981987d862c7320cee8741122a2649e9b08e850b6f20442",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.8.0/rules_nodejs-3.8.0.tar.gz"],
)

# Check the bazel version and download npm dependencies
Expand All @@ -27,6 +24,7 @@ npm_install(
name = "npm",
package_json = "//:package.json",
package_lock_json = "//:package-lock.json",
symlink_node_modules = False, # https://github.com/bazelbuild/bazel/issues/15463
)

http_archive(
Expand Down
Loading

0 comments on commit a258373

Please sign in to comment.