Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NET-3024] Configure GitHub Actions (#544)
* bootstrap github actions Signed-off-by: Dan Bond <danbond@protonmail.com> * master -> main Signed-off-by: Dan Bond <danbond@protonmail.com> * go fmt Signed-off-by: Dan Bond <danbond@protonmail.com> * fix go vet issues Signed-off-by: Dan Bond <danbond@protonmail.com> * add 386 support Signed-off-by: Dan Bond <danbond@protonmail.com> * add go1.19 Signed-off-by: Dan Bond <danbond@protonmail.com> * revert integ test Signed-off-by: Dan Bond <danbond@protonmail.com> * x86 -> x32 Signed-off-by: Dan Bond <danbond@protonmail.com> * install multilib Signed-off-by: Dan Bond <danbond@protonmail.com> * only use go.mod version Signed-off-by: Dan Bond <danbond@protonmail.com> * arch specific builds Signed-off-by: Dan Bond <danbond@protonmail.com> * fix run error Signed-off-by: Dan Bond <danbond@protonmail.com> * fix if logic Signed-off-by: Dan Bond <danbond@protonmail.com> * INTEG_TESTS: yes Signed-off-by: Dan Bond <danbond@protonmail.com> * remove circle config Signed-off-by: Dan Bond <danbond@protonmail.com> * pin actions versions Signed-off-by: Dan Bond <danbond@protonmail.com> * build last 2 versions of go Signed-off-by: Dan Bond <danbond@protonmail.com> * fix typo Signed-off-by: Dan Bond <danbond@protonmail.com> * add permissions Signed-off-by: Dan Bond <danbond@protonmail.com> --------- Signed-off-by: Dan Bond <danbond@protonmail.com>
- Loading branch information
Showing
8 changed files
with
206 additions
and
209 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
* @hashicorp/consul-core-reviewers | ||
|
||
/.release/ @hashicorp/release-engineering | ||
/.github/workflows/ci.yml @hashicorp/release-engineering |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: ci | ||
|
||
on: | ||
pull_request: | ||
branches: ["main"] | ||
push: | ||
branches: ["main"] | ||
tags: ["*"] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
go-fmt-and-vet: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0 | ||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0 | ||
with: | ||
go-version: '1.20' | ||
cache: true | ||
- run: | | ||
files=$(go fmt ./...) | ||
if [ -n "$files" ]; then | ||
echo "The following file(s) do not conform to go fmt:" | ||
echo "$files" | ||
exit 1 | ||
fi | ||
- run: | | ||
PACKAGE_NAMES=$(go list ./... | grep -v github.com/hashicorp/raft/fuzzy) | ||
go vet $PACKAGE_NAMES | ||
go-test: | ||
needs: go-fmt-and-vet | ||
strategy: | ||
matrix: | ||
go: ['1.19', '1.20'] | ||
arch: ['x32', 'x64'] | ||
runs-on: ubuntu-22.04 | ||
env: | ||
INTEG_TESTS: yes | ||
steps: | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0 | ||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
architecture: ${{ matrix.arch }} | ||
cache: true | ||
# x86 specific build. | ||
- if: matrix.arch == 'x32' | ||
run: | | ||
sudo apt-get install gcc-multilib | ||
go test --tags batchtest ./... | ||
# x86-64 specific build. | ||
- if: matrix.arch == 'x64' | ||
run: go test -race --tags batchtest ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.