Skip to content

Commit

Permalink
ci: update workflows
Browse files Browse the repository at this point in the history
- bump and reorder actions (to enable modules caching)
- force go 1.17 module compatibility

Signed-off-by: Michael Gasch <15986659+embano1@users.noreply.github.com>
  • Loading branch information
embano1 committed Jul 6, 2023
1 parent 5d7e274 commit d07cee9
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 44 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@ jobs:
runs-on: ${{ matrix.platform }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
id: go

- name: Checkout code
uses: actions/checkout@v2

- name: Update git submodule
run: git submodule sync && git submodule update --init

Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/go-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@ jobs:
runs-on: ${{ matrix.platform }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
id: go

- name: Checkout code
uses: actions/checkout@v2

- name: Build
run: ./hack/build-test.sh

7 changes: 3 additions & 4 deletions .github/workflows/go-format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Go 1.17.x
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.17.x
id: go

- name: Checkout code
uses: actions/checkout@v2

- name: Go Format
shell: bash
run: |
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/go-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Go 1.17.x
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.17.x
id: go

- name: Checkout code
uses: actions/checkout@v2

- id: golangci_configuration
uses: andstor/file-existence-action@v1
with:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/go-unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ jobs:
runs-on: ${{ matrix.platform }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
id: go

- name: Checkout code
uses: actions/checkout@v2

- name: Test
run: ./hack/unit-test.sh
2 changes: 1 addition & 1 deletion .github/workflows/inclusive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Woke
uses: get-woke/woke-action-reviewdog@v0
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,15 @@ jobs:
- 5672:5672

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
id: go

- name: Checkout code
uses: actions/checkout@v2


- name: Test
run: ./hack/integration-test.sh

7 changes: 3 additions & 4 deletions .github/workflows/observability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@ jobs:
runs-on: ${{ matrix.platform }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
id: go

- name: Checkout code
uses: actions/checkout@v2

- name: Update git submodule
run: git submodule sync && git submodule update --init

Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
next: ${{ steps.ggsv.outputs.next}}
steps:
- name: Setup Go 1.17.x
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.17.x

Expand All @@ -32,7 +32,7 @@ jobs:
needs: semver
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Create Release ${{ needs.semver.outputs.next }}
uses: actions/create-release@v1
Expand All @@ -52,13 +52,14 @@ jobs:
env:
VERSION: ${{ needs.semver.outputs.next }}
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Set up Go 1.17.x
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.17.x

- name: Checkout Code
uses: actions/checkout@v2
- run: git pull

- name: Update Modules
Expand All @@ -85,12 +86,12 @@ jobs:
VERSION: ${{ needs.semver.outputs.next }}
steps:
- name: Set up Go 1.17.x
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.17.x

- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
- run: git pull

- name: Update Examples
Expand Down
2 changes: 1 addition & 1 deletion hack/conformance-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ pushd ./test/conformance
go test --tags=conformance -v -timeout 15s

# Remove test only deps.
go mod tidy
go mod tidy -compat=1.17
popd
2 changes: 1 addition & 1 deletion hack/go-mod-tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ set -o pipefail
for gomodule in $(find . | grep "go\.mod" | awk '{gsub(/\/go.mod/,""); print $0}' | grep -v "./test" | grep -v "./conformance")
do
pushd $gomodule
go mod tidy
go mod tidy -compat=1.17
popd
done
2 changes: 1 addition & 1 deletion hack/integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ done
rm coverage.tmp

# Remove test only deps.
go mod tidy
go mod tidy -compat=1.17

popd
2 changes: 1 addition & 1 deletion hack/observability-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ done
rm coverage.tmp

# Remove test only deps.
go mod tidy
go mod tidy -compat=1.17

popd
2 changes: 1 addition & 1 deletion hack/tag-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ do
go get -d $repoint@$tag
go mod edit -dropreplace $repoint
fi
go mod tidy
go mod tidy -compat=1.17
done
popd > /dev/null

Expand Down
2 changes: 1 addition & 1 deletion hack/unit-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ do

rm coverage.tmp
# Remove test only deps.
go mod tidy
go mod tidy -compat=1.17
popd
done

0 comments on commit d07cee9

Please sign in to comment.