diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 2c538c5..0bc079b 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -13,12 +13,8 @@ jobs: steps: # Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it - uses: actions/checkout@v2 - - - name: Setup Bazel - uses: abhinavsingh/setup-bazel@v3 - with: - # Must match version in repo's .bazelversion file. - version: 5.1.0 - - name: Run tests run: ./test.sh + - name: Check examples + working-directory: examples + run: bazel test //... \ No newline at end of file diff --git a/examples/.bazelrc b/examples/.bazelrc index 69f3037..8501a48 100644 --- a/examples/.bazelrc +++ b/examples/.bazelrc @@ -1,2 +1 @@ -build --aspects //tools/linting:aspect.bzl%lint -build --output_groups=+report \ No newline at end of file +test --test_output=errors \ No newline at end of file diff --git a/examples/third_party/BUILD b/examples/third_party/BUILD index e69de29..af9a71e 100644 --- a/examples/third_party/BUILD +++ b/examples/third_party/BUILD @@ -0,0 +1,15 @@ +load("@my_deps//:requirements.bzl", "requirement") +load("@mypy_integration//:mypy.bzl", "mypy_test") + +py_binary( + name = "uses-deps", + srcs = ["uses-deps.py"], + deps = [ + requirement("types_python_dateutil"), + ], +) + +mypy_test( + name = "uses_deps_mypy", + deps = [":uses-deps"], +) diff --git a/examples/third_party/requirements.txt b/examples/third_party/requirements.txt index 8bd35a5..1288051 100644 --- a/examples/third_party/requirements.txt +++ b/examples/third_party/requirements.txt @@ -1 +1,3 @@ -parse==1.12.1 \ No newline at end of file +parse==1.12.1 +types-python-dateutil==0.1.4 + diff --git a/examples/third_party/uses-deps.py b/examples/third_party/uses-deps.py new file mode 100644 index 0000000..78999a5 --- /dev/null +++ b/examples/third_party/uses-deps.py @@ -0,0 +1,4 @@ +import dateutil +from dateutil import parser + +dateutil.parser.parse("1970") diff --git a/examples/tools/typing/mypy_version.txt b/examples/tools/typing/mypy_version.txt index b6b451f..df10b20 100644 --- a/examples/tools/typing/mypy_version.txt +++ b/examples/tools/typing/mypy_version.txt @@ -1 +1,2 @@ -mypy==0.750 \ No newline at end of file +mypy==0.910 +typed_ast \ No newline at end of file