From 44d5b0c71addc7f70f9281150115a23e1b843f67 Mon Sep 17 00:00:00 2001 From: akakou Date: Mon, 6 May 2024 09:19:47 +0900 Subject: [PATCH 1/4] chore: testing ci --- .github/workflows/go.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..5af8cdb --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,25 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Go + +on: + push: + branches: [ "develop" ] + pull_request: + branches: [ "develop" ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Test + run: bash -c 'go test -v ./.../test/ ./.../ttp/api ./.../ttp/audit' From 12f6439956bddd075fa5064c410841729124918d Mon Sep 17 00:00:00 2001 From: akakou Date: Mon, 6 May 2024 09:20:40 +0900 Subject: [PATCH 2/4] fix: force error --- ttp/api/server_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ttp/api/server_test.go b/ttp/api/server_test.go index 78fb737..5017142 100644 --- a/ttp/api/server_test.go +++ b/ttp/api/server_test.go @@ -79,6 +79,6 @@ func TestTAFromDomainAPI(t *testing.T) { assert.Equal(t, violation.ID, respTa[0].Edges.Violation[0].ID) - t.Errorf("%v", string(bytes)) + // t.Errorf("%v", string(bytes)) } From 1f223e9dd36b49ecc7974215bb51f59b1eb85d51 Mon Sep 17 00:00:00 2001 From: akakou Date: Mon, 6 May 2024 09:27:30 +0900 Subject: [PATCH 3/4] fix: path --- .github/workflows/go.yml | 2 +- .github/workflows/test.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.sh diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 5af8cdb..49d586f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -22,4 +22,4 @@ jobs: go-version: '1.20' - name: Test - run: bash -c 'go test -v ./.../test/ ./.../ttp/api ./.../ttp/audit' + run: sh .github/workflows/test.sh diff --git a/.github/workflows/test.sh b/.github/workflows/test.sh new file mode 100644 index 0000000..2c10233 --- /dev/null +++ b/.github/workflows/test.sh @@ -0,0 +1,5 @@ +cd test && go test . +cd .. +cd ttp/api && go test . +cd ../../ +cd ttp/ct && go test . \ No newline at end of file From 06f5ef3d11add5983aad44522455cb4943910bc9 Mon Sep 17 00:00:00 2001 From: akakou Date: Mon, 6 May 2024 09:29:56 +0900 Subject: [PATCH 4/4] fix: upgrade go --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 49d586f..8c0ac68 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21.5' - name: Test run: sh .github/workflows/test.sh