From afed5bf109cd2ccaa289a14500f7b7b1091fe69f Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Wed, 24 Feb 2021 10:59:16 +0530 Subject: [PATCH 1/3] ci: fix codegen err codegen is currently broken in master. this commit fix the broken codegen by fixing the correct working directory in gh action. Signed-off-by: subhamkrai --- .github/workflows/codegen.yml | 12 ++++++++---- tests/scripts/validate_modified_files.sh | 1 - 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codegen.yml b/.github/workflows/codegen.yml index d4173676b..0c67ea10e 100644 --- a/.github/workflows/codegen.yml +++ b/.github/workflows/codegen.yml @@ -8,16 +8,20 @@ jobs: codegen: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v1 - - uses: actions/setup-go@v2 with: go-version: 1.15 + - name: checkout + uses: actions/checkout@v1 + + - name: copy working directory to GOPATH + run: sudo mkdir -p /home/runner/go/src/github.com && sudo cp -a /home/runner/work/rook /home/runner/go/src/github.com/ + - name: run codegen + working-directory: /home/runner/go/src/github.com/rook/rook run: GOPATH=$(go env GOPATH) make codegen - name: validate codegen + working-directory: /home/runner/go/src/github.com/rook/rook run: tests/scripts/validate_modified_files.sh codegen - diff --git a/tests/scripts/validate_modified_files.sh b/tests/scripts/validate_modified_files.sh index b2bf62b0e..8e2b2f692 100755 --- a/tests/scripts/validate_modified_files.sh +++ b/tests/scripts/validate_modified_files.sh @@ -37,4 +37,3 @@ case "$1" in exit 1 esac - From fd6f6d4953ec984c9f045e676543a0ba2c339f82 Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Fri, 26 Feb 2021 10:05:26 +0530 Subject: [PATCH 2/3] ci: replace `cd` with `working-directory` this commit replace `cd` with `working-directory` in gh action. Signed-off-by: subhamkrai --- .github/workflows/unit-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 5f1f831c3..96d9e053f 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -19,5 +19,6 @@ jobs: run: sudo mkdir -p /home/runner/go/src/github.com && sudo cp -a /home/runner/work/rook /home/runner/go/src/github.com/ - name: run unit tests - run: cd /home/runner/go/src/github.com/rook/rook && GOPATH=$(go env GOPATH) make -j $(nproc) test + working-directory: /home/runner/go/src/github.com/rook/rook + run: GOPATH=$(go env GOPATH) make -j $(nproc) test From 9b6bf829254f710db16c71a09cbe21e0a9967a10 Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Mon, 1 Mar 2021 10:05:53 +0530 Subject: [PATCH 3/3] ci: update checkout version this commit update checkout version. Signed-off-by: subhamkrai --- .github/workflows/build.yml | 2 +- .github/workflows/codegen.yml | 2 +- .github/workflows/mod-check.yml | 2 +- .github/workflows/unit-test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07be358b6..adfecd3cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: diff --git a/.github/workflows/codegen.yml b/.github/workflows/codegen.yml index 0c67ea10e..75287fd91 100644 --- a/.github/workflows/codegen.yml +++ b/.github/workflows/codegen.yml @@ -13,7 +13,7 @@ jobs: go-version: 1.15 - name: checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: copy working directory to GOPATH run: sudo mkdir -p /home/runner/go/src/github.com && sudo cp -a /home/runner/work/rook /home/runner/go/src/github.com/ diff --git a/.github/workflows/mod-check.yml b/.github/workflows/mod-check.yml index 3dcefe9e8..dc7a32138 100644 --- a/.github/workflows/mod-check.yml +++ b/.github/workflows/mod-check.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 96d9e053f..42c877b7b 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: