Skip to content

Commit 1efae2f

Browse files
authored
fix: Fixes various deprecations in test action (#425)
- 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.
1 parent 3900552 commit 1efae2f

4 files changed

Lines changed: 3764 additions & 2785 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
- push
1818
jobs:
1919
test:
20-
runs-on: ubuntu-latest
20+
runs-on: ubuntu-20.04
2121
steps:
2222
- uses: actions/checkout@v2
2323
with:

WORKSPACE

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@
33
workspace(
44
# How this workspace would be referenced with absolute labels from another workspace
55
name = "openapi-specification",
6-
# Map the @npm bazel workspace to the node_modules directory.
7-
# This lets Bazel use the same node_modules as other local tooling.
8-
managed_directories = {"@npm": ["node_modules"]},
96
)
107

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

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

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

3230
http_archive(

0 commit comments

Comments
 (0)