File tree Expand file tree Collapse file tree 6 files changed +29
-16
lines changed Expand file tree Collapse file tree 6 files changed +29
-16
lines changed Original file line number Diff line number Diff line change 15
15
- uses : actions/checkout@v3
16
16
- uses : ./.github/actions/fetch-codeql
17
17
- uses : bazelbuild/setup-bazelisk@v2
18
- - uses : actions/setup-python@v3
19
- with :
20
- python-version : ' ~3.8'
21
- cache : ' pip'
22
- - name : Install python dependencies
23
- run : |
24
- pip install -r swift/codegen/requirements.txt
25
18
- name : Run unit tests
26
19
run : |
27
20
bazel test //swift/codegen/test --test_output=errors
Original file line number Diff line number Diff line change 29
29
- uses : actions/checkout@v3
30
30
- uses : ./.github/actions/fetch-codeql
31
31
- uses : bazelbuild/setup-bazelisk@v2
32
- - uses : actions/setup-python@v3
33
- with :
34
- python-version : ' ~3.8'
35
- cache : ' pip'
36
- - name : Install python dependencies
37
- run : |
38
- pip install -r codegen/requirements.txt
39
32
- name : Build Swift extractor
40
33
run : |
41
34
bazel run //swift:create-extractor-pack
Original file line number Diff line number Diff line change @@ -45,3 +45,14 @@ def codeql_workspace(repository_name = "codeql"):
45
45
"https://github.com/bazelbuild/platforms/releases/download/0.0.3/platforms-0.0.3.tar.gz" ,
46
46
],
47
47
)
48
+
49
+ maybe (
50
+ repo_rule = http_archive ,
51
+ name = "rules_python" ,
52
+ sha256 = "cdf6b84084aad8f10bf20b46b77cb48d83c319ebe6458a18e9d2cebf57807cdd" ,
53
+ strip_prefix = "rules_python-0.8.1" ,
54
+ urls = [
55
+ "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.8.1.tar.gz" ,
56
+ ],
57
+ )
58
+
Original file line number Diff line number Diff line change 1
1
load ("@rules_pkg//:deps.bzl" , "rules_pkg_dependencies" )
2
+ load ("@rules_python//python:pip.bzl" , "pip_install" )
2
3
3
- def codeql_workspace_deps ():
4
+ def codeql_workspace_deps (repository_name = "codeql" ):
5
+ pip_install (
6
+ name = "swift_codegen_deps" ,
7
+ requirements = "@%s//swift/codegen:requirements.txt" % repository_name ,
8
+ )
4
9
rules_pkg_dependencies ()
Original file line number Diff line number Diff line change
1
+ load ("@swift_codegen_deps//:requirements.bzl" , "requirement" )
1
2
py_library (
2
3
name = "lib" ,
3
4
srcs = glob (["*.py" ]),
5
+ deps = [
6
+ requirement ("pystache" ),
7
+ requirement ("pyyaml" ),
8
+ requirement ("inflection" ),
9
+ ],
4
10
visibility = ["//swift/codegen:__subpackages__" ],
5
11
)
Original file line number Diff line number Diff line change
1
+ load ("@swift_codegen_deps//:requirements.bzl" , "requirement" )
2
+
1
3
py_library (
2
4
name = "utils" ,
3
5
testonly = True ,
4
6
srcs = ["utils.py" ],
5
- deps = ["//swift/codegen/lib" ],
7
+ deps = [
8
+ "//swift/codegen/lib" ,
9
+ requirement ("pytest" ),
10
+ ],
6
11
)
7
12
8
13
[
You can’t perform that action at this time.
0 commit comments