Skip to content

Commit

Permalink
Merge pull request #133 from hashicorp/convert-hashicorp-go-memdb-to-…
Browse files Browse the repository at this point in the history
…actions-20230405-182715

Convert hashicorp/go-memdb to GitHub Actions
  • Loading branch information
shore committed Apr 5, 2023
2 parents 501eb37 + e491812 commit fe53ab5
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 73 deletions.
73 changes: 0 additions & 73 deletions .circleci/config.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/dependabot.yml
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"
18 changes: 18 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint GitHub Actions Workflows
on:
push:
paths:
- .github/**

permissions:
contents: read

jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- name: "Check workflow files"
uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint:latest
with:
args: -color
55 changes: 55 additions & 0 deletions .github/workflows/test-and-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Test and Build

on:
push:

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version-file: go.mod
- run: go mod download
- name: Check Formatting
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: Vet code
run: go vet ./...

go-test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version:
- '1.13' # oldest supported; named in go.mod
- 'oldstable'
- 'stable'
env:
TEST_RESULTS_PATH: '/tmp/test-results'
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ matrix.go-version }}
- uses: autero1/action-gotestsum@2e48af62f5248bd3b014f598cd1aa69a01dd36e3 # v1.0.0
with:
gotestsum_version: 1.9.0

- run: mkdir -p "$TEST_RESULTS_PATH"
- name: Run go tests
run: |
gotestsum --format=short-verbose --junitfile "$TEST_RESULTS_PATH/gotestsum-report.xml" -- ./...
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
path: ${{ env.TEST_RESULTS_PATH }}
name: tests-linux
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @hashicorp/release-engineering

0 comments on commit fe53ab5

Please sign in to comment.