-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #184 from hashicorp/convert-hashicorp-go-retryable…
…http-to-actions-20230403-212814 Convert hashicorp/go-retryablehttp to GitHub Actions
- Loading branch information
Showing
4 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
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,12 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
|
||
- 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,19 @@ | ||
name: actionlint | ||
|
||
on: | ||
push: | ||
paths: | ||
- .github/** | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
actionlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 | ||
- name: "Check GitHub workflow files" | ||
uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint:latest | ||
with: | ||
args: -color |
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,45 @@ | ||
name: Build | ||
on: | ||
push: | ||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
env: | ||
TEST_RESULTS: "/tmp/test-results" | ||
steps: | ||
- name: Setup go | ||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 | ||
with: | ||
go-version: 1.14.2 | ||
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 | ||
- run: mkdir -p "$TEST_RESULTS"/go-retryablyhttp | ||
- name: restore_cache | ||
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6 | ||
with: | ||
key: go-mod-v1-{{ checksum "go.sum" }} | ||
restore-keys: go-mod-v1-{{ checksum "go.sum" }} | ||
path: "/go/pkg/mod" | ||
- run: go mod download | ||
- name: Run go format | ||
run: |- | ||
files=$(go fmt ./...) | ||
if [ -n "$files" ]; then | ||
echo "The following file(s) do not conform to go fmt:" | ||
echo "$files" | ||
exit 1 | ||
fi | ||
- name: Install gotestsum | ||
run: go get gotest.tools/gotestsum | ||
- name: Run unit tests | ||
run: |- | ||
PACKAGE_NAMES=$(go list ./...) | ||
# shellcheck disable=SC2086 # can't quote package list | ||
gotestsum --junitfile "${TEST_RESULTS}"/go-retryablyhttp/gotestsum-report.xml -- $PACKAGE_NAMES | ||
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | ||
with: | ||
path: "/tmp/test-results" | ||
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | ||
with: | ||
path: "/tmp/test-results" | ||
permissions: | ||
contents: read |
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 @@ | ||
* @hashicorp/release-engineering |