From 830f8298b3c543f01f4913b30a57e0edd687aef7 Mon Sep 17 00:00:00 2001 From: Gergely Csatari Date: Sat, 12 Oct 2024 12:45:32 +0300 Subject: [PATCH 01/11] Adding automatic testing for the validator Signed-off-by: Gergely Csatari --- .github/workflows/test-validator.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/test-validator.yml diff --git a/.github/workflows/test-validator.yml b/.github/workflows/test-validator.yml new file mode 100644 index 0000000..d582bc7 --- /dev/null +++ b/.github/workflows/test-validator.yml @@ -0,0 +1,15 @@ +name: "Test validator" +on: + pull_request: + paths: + - 'tools/openchain_telco_sbom_validator/**' + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Run tests + run: | + tools/openchain_telco_sbom_validator/testing/test-test.sh \ No newline at end of file From 9159f81c1bdf865bd4c35800c22bcf347f42e9ea Mon Sep 17 00:00:00 2001 From: Gergely Csatari Date: Sat, 12 Oct 2024 12:51:15 +0300 Subject: [PATCH 02/11] Fixing the workflow Signed-off-by: Gergely Csatari --- .github/workflows/test-validator.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-validator.yml b/.github/workflows/test-validator.yml index d582bc7..6251788 100644 --- a/.github/workflows/test-validator.yml +++ b/.github/workflows/test-validator.yml @@ -5,11 +5,15 @@ on: - 'tools/openchain_telco_sbom_validator/**' jobs: - docs: + test: runs-on: ubuntu-latest steps: - name: Check out repository code uses: actions/checkout@v4 + - name: Get test tools + run: | + cd tools/openchain_telco_sbom_validator/testing/ + wget https://raw.githubusercontent.com/thorsteinssonh/bash_test_tools/master/bash_test_tools - name: Run tests run: | - tools/openchain_telco_sbom_validator/testing/test-test.sh \ No newline at end of file + testing/test-test.sh \ No newline at end of file From 8a4f41b6caeb3ce2b96ef50145d28040550d2d0e Mon Sep 17 00:00:00 2001 From: Gergely Csatari Date: Sat, 12 Oct 2024 12:54:43 +0300 Subject: [PATCH 03/11] More fixes to the workflow Signed-off-by: Gergely Csatari --- .github/workflows/test-validator.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-validator.yml b/.github/workflows/test-validator.yml index 6251788..10e2fce 100644 --- a/.github/workflows/test-validator.yml +++ b/.github/workflows/test-validator.yml @@ -16,4 +16,4 @@ jobs: wget https://raw.githubusercontent.com/thorsteinssonh/bash_test_tools/master/bash_test_tools - name: Run tests run: | - testing/test-test.sh \ No newline at end of file + test-test.sh \ No newline at end of file From 717e395de99e0cdee05ffd7740fd9a4315e4256e Mon Sep 17 00:00:00 2001 From: Gergely Csatari Date: Sat, 12 Oct 2024 12:57:55 +0300 Subject: [PATCH 04/11] Some debugging Signed-off-by: Gergely Csatari --- .github/workflows/test-validator.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-validator.yml b/.github/workflows/test-validator.yml index 10e2fce..f491d28 100644 --- a/.github/workflows/test-validator.yml +++ b/.github/workflows/test-validator.yml @@ -16,4 +16,6 @@ jobs: wget https://raw.githubusercontent.com/thorsteinssonh/bash_test_tools/master/bash_test_tools - name: Run tests run: | - test-test.sh \ No newline at end of file + pwd + ls -la + ./test-test.sh \ No newline at end of file From 9fba56dde92436002b2da4c148fec2979a10da7d Mon Sep 17 00:00:00 2001 From: Gergely Csatari Date: Sat, 12 Oct 2024 13:04:24 +0300 Subject: [PATCH 05/11] Still fixing the workflow Signed-off-by: Gergely Csatari --- .github/workflows/test-validator.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test-validator.yml b/.github/workflows/test-validator.yml index f491d28..04c1b70 100644 --- a/.github/workflows/test-validator.yml +++ b/.github/workflows/test-validator.yml @@ -16,6 +16,5 @@ jobs: wget https://raw.githubusercontent.com/thorsteinssonh/bash_test_tools/master/bash_test_tools - name: Run tests run: | - pwd - ls -la + cd tools/openchain_telco_sbom_validator/testing/ ./test-test.sh \ No newline at end of file From 2d07abac794360dbfc1a1d70ab71315320233b9a Mon Sep 17 00:00:00 2001 From: Gergely Csatari Date: Sat, 12 Oct 2024 13:10:09 +0300 Subject: [PATCH 06/11] More workflow fixes Signed-off-by: Gergely Csatari --- .github/workflows/test-validator.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-validator.yml b/.github/workflows/test-validator.yml index 04c1b70..5e28f6b 100644 --- a/.github/workflows/test-validator.yml +++ b/.github/workflows/test-validator.yml @@ -10,9 +10,11 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 - - name: Get test tools + - name: Building environment run: | - cd tools/openchain_telco_sbom_validator/testing/ + cd tools/openchain_telco_sbom_validator/ + python3 -m venv .env + cd testing/ wget https://raw.githubusercontent.com/thorsteinssonh/bash_test_tools/master/bash_test_tools - name: Run tests run: | From e7f26d9287e8af7671e61ab9aec9165addd79046 Mon Sep 17 00:00:00 2001 From: Gergely Csatari Date: Sat, 12 Oct 2024 13:14:57 +0300 Subject: [PATCH 07/11] Setting terminal for the test script Signed-off-by: Gergely Csatari --- .github/workflows/test-validator.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-validator.yml b/.github/workflows/test-validator.yml index 5e28f6b..c2d871d 100644 --- a/.github/workflows/test-validator.yml +++ b/.github/workflows/test-validator.yml @@ -19,4 +19,5 @@ jobs: - name: Run tests run: | cd tools/openchain_telco_sbom_validator/testing/ + export TERM=xterm-256color ./test-test.sh \ No newline at end of file From 58dfea8c7bc813f6de6a91ac809dc5f42f7796a8 Mon Sep 17 00:00:00 2001 From: Gergely Csatari Date: Sat, 12 Oct 2024 13:18:13 +0300 Subject: [PATCH 08/11] Still figuring out the terminal setting Signed-off-by: Gergely Csatari --- .github/workflows/test-validator.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-validator.yml b/.github/workflows/test-validator.yml index c2d871d..fe1307e 100644 --- a/.github/workflows/test-validator.yml +++ b/.github/workflows/test-validator.yml @@ -7,6 +7,8 @@ on: jobs: test: runs-on: ubuntu-latest + env: + TERM: dumb steps: - name: Check out repository code uses: actions/checkout@v4 @@ -19,5 +21,4 @@ jobs: - name: Run tests run: | cd tools/openchain_telco_sbom_validator/testing/ - export TERM=xterm-256color ./test-test.sh \ No newline at end of file From 7f760e65d3fefcccd26a6048ed6e7c1ea470c7de Mon Sep 17 00:00:00 2001 From: Gergely Csatari Date: Sat, 12 Oct 2024 13:23:05 +0300 Subject: [PATCH 09/11] Still the terminal... Signed-off-by: Gergely Csatari --- .github/workflows/test-validator.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-validator.yml b/.github/workflows/test-validator.yml index fe1307e..979f8da 100644 --- a/.github/workflows/test-validator.yml +++ b/.github/workflows/test-validator.yml @@ -8,7 +8,7 @@ jobs: test: runs-on: ubuntu-latest env: - TERM: dumb + TERM: vt100 steps: - name: Check out repository code uses: actions/checkout@v4 From 9fd149ac1a7f8d0ebf036515ff8a132fd97546b1 Mon Sep 17 00:00:00 2001 From: Gergely Csatari Date: Sat, 12 Oct 2024 13:25:48 +0300 Subject: [PATCH 10/11] Terminal problem being very persistent Signed-off-by: Gergely Csatari --- .github/workflows/test-validator.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-validator.yml b/.github/workflows/test-validator.yml index 979f8da..7290b11 100644 --- a/.github/workflows/test-validator.yml +++ b/.github/workflows/test-validator.yml @@ -21,4 +21,5 @@ jobs: - name: Run tests run: | cd tools/openchain_telco_sbom_validator/testing/ + echo $TERM ./test-test.sh \ No newline at end of file From 2c6cc72da067e5b7f156da50789efd0a73f7b46c Mon Sep 17 00:00:00 2001 From: Gergely Csatari Date: Sat, 12 Oct 2024 13:30:00 +0300 Subject: [PATCH 11/11] Last try to make tput happy with a terminal setting Signed-off-by: Gergely Csatari --- .github/workflows/test-validator.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-validator.yml b/.github/workflows/test-validator.yml index 7290b11..a20b03b 100644 --- a/.github/workflows/test-validator.yml +++ b/.github/workflows/test-validator.yml @@ -8,7 +8,7 @@ jobs: test: runs-on: ubuntu-latest env: - TERM: vt100 + TERM: linux steps: - name: Check out repository code uses: actions/checkout@v4