Skip to content

Commit 4d9d65f

Browse files
authored
Merge pull request #1772 from tweag/ip/test-supported-bazel-versions
Test all supported bazel versions in integration tests
2 parents 072e23b + c4b5e1a commit 4d9d65f

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

bazel_versions.bzl

-7
This file was deleted.

haskell/private/versions.bzl

+11-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
# in this file executes (and there's no way to execute it later; see first
1111
# paragraph above).
1212

13+
SUPPORTED_BAZEL_VERSIONS = [
14+
"4.0.0",
15+
"4.2.2",
16+
]
17+
18+
SUPPORTED_NIXPKGS_BAZEL_PACKAGES = [
19+
"bazel_4",
20+
]
21+
1322
def _parse_version_chunk(version_chunk):
1423
"""
1524
Args:
@@ -112,8 +121,8 @@ def check_bazel_version(minimum_bazel_version, maximum_bazel_version = None, baz
112121
return (True, "")
113122

114123
def check_bazel_version_compatible(actual_version):
115-
min_bazel = "4.0.0" # Change THIS LINE when changing bazel min version
116-
max_bazel = "4.2.2" # Change THIS LINE when changing bazel max version
124+
min_bazel = SUPPORTED_BAZEL_VERSIONS[0]
125+
max_bazel = SUPPORTED_BAZEL_VERSIONS[-1]
117126

118127
(compatible, msg) = check_bazel_version(min_bazel, max_bazel, actual_version)
119128

tests/integration_testing/dependencies.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
load("@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl", "nixpkgs_package")
22
load("@contrib_rules_bazel_integration_test//bazel_integration_test:defs.bzl", "bazel_binaries")
33
load(
4-
"//:bazel_versions.bzl",
4+
"//haskell:private/versions.bzl",
55
"SUPPORTED_BAZEL_VERSIONS",
66
"SUPPORTED_NIXPKGS_BAZEL_PACKAGES",
77
)

tests/integration_testing/rules_haskell_integration_test.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ load(
44
"integration_test_utils",
55
)
66
load(
7-
"//:bazel_versions.bzl",
7+
"//haskell:private/versions.bzl",
88
"SUPPORTED_BAZEL_VERSIONS",
99
"SUPPORTED_NIXPKGS_BAZEL_PACKAGES",
1010
)

0 commit comments

Comments
 (0)