Skip to content

Commit

Permalink
Offer more fine grained test scripts and increase reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
martis42 committed May 5, 2024
1 parent 2b1117d commit ccaca4c
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 39 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions scripts/build_aspect_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -o errexit

cd test/aspect
bazel build //...
cd -
7 changes: 7 additions & 0 deletions scripts/build_examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -o errexit

cd examples
bazel build //...
cd -
29 changes: 29 additions & 0 deletions test_basic.sh
Original file line number Diff line number Diff line change
@@ -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
38 changes: 5 additions & 33 deletions tests.sh → test_full.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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

0 comments on commit ccaca4c

Please sign in to comment.