diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index eef3924..739bef7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,13 +31,9 @@ jobs: - name: Execute Mypy run: ./scripts/mypy.sh - name: Build aspect integration tests - run: | - cd test/aspect - bazel build //... + run: ./scripts/build_aspect_tests.sh - name: Build examples - run: | - cd examples - bazel build //... + run: ./scripts/build_examples.sh integration-tests-aspect: strategy: diff --git a/scripts/build_aspect_tests.sh b/scripts/build_aspect_tests.sh new file mode 100755 index 0000000..d3fa6f9 --- /dev/null +++ b/scripts/build_aspect_tests.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -o errexit + +cd test/aspect +bazel build //... +cd - diff --git a/scripts/build_examples.sh b/scripts/build_examples.sh new file mode 100755 index 0000000..a93c370 --- /dev/null +++ b/scripts/build_examples.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -o errexit + +cd examples +bazel build //... +cd - diff --git a/test_basic.sh b/test_basic.sh new file mode 100755 index 0000000..718641e --- /dev/null +++ b/test_basic.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset + +echo "" +echo "Pre-commit checks" +echo "" +poetry run pre-commit run --all-files + +echo "" +echo "Execute unit tests" +echo "" +./scripts/unit_tests.sh + +echo "" +echo "Executing mypy" +echo "" +./scripts/mypy.sh + +echo "" +echo "Build aspect integration tests" +echo "" +./scripts/build_aspect_tests.sh + +echo "" +echo "Build examples" +echo "" +./scripts/build_examples.sh diff --git a/tests.sh b/test_full.sh similarity index 53% rename from tests.sh rename to test_full.sh index 8d88784..1cb4356 100755 --- a/tests.sh +++ b/test_full.sh @@ -1,36 +1,18 @@ #!/usr/bin/env bash set -o errexit -set -o nounset -echo "" -echo "Pre-commit checks" -echo "" -poetry run pre-commit run --all-files - -echo "" -echo "Execute unit tests" -echo "" -./scripts/unit_tests.sh +./test_basic.sh echo "" -echo "Executing mypy" -echo "" -./scripts/mypy.sh - -echo "" -echo "Build aspect integration tests" +echo "Execute integration tests - Examples with bzlmod" echo "" -cd test/aspect -bazel build //... -cd - +./examples/test.py echo "" -echo "Build examples" +echo "Execute integration tests - Examples with WORKSPACE setup" echo "" -cd examples -bazel build //... -cd - +./examples/test.py --legacy-workspace echo "" echo "Execute integration tests - Aspect" @@ -41,13 +23,3 @@ echo "" echo "Execute integration tests - Applying fixes" echo "" ./test/apply_fixes/execute_tests.py - -echo "" -echo "Execute integration tests - Examples with bzlmod" -echo "" -./examples/test.py - -echo "" -echo "Execute integration tests - Examples with WORKSPACE setup" -echo "" -./examples/test.py --legacy-workspace