Merge pull request #93 from estesp/dependabot/go_modules/github.com/d… #74
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
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
checks: | |
name: Project Checks | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.20.x | |
- name: Set env | |
shell: bash | |
run: | | |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV | |
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH | |
- uses: actions/checkout@v3 | |
with: | |
path: src/github.com/estesp/bucketbench | |
fetch-depth: 25 | |
- name: Linter | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.51.1 | |
skip-cache: true | |
working-directory: src/github.com/estesp/bucketbench | |
- name: Install dependencies | |
env: | |
GO111MODULE: off | |
run: go get -u github.com/vbatts/git-validation | |
- name: DCO | |
env: | |
GITHUB_COMMIT_URL: ${{ github.event.pull_request.commits_url }} | |
DCO_VERBOSITY: "-q" | |
DCO_RANGE: "" | |
working-directory: src/github.com/estesp/bucketbench | |
run: | | |
if [ -z "${GITHUB_COMMIT_URL}" ]; then | |
DCO_RANGE=$(jq -r '.before +".."+ .after' ${GITHUB_EVENT_PATH}) | |
else | |
DCO_RANGE=$(curl ${GITHUB_COMMIT_URL} | jq -r '.[0].parents[0].sha +".."+ .[-1].sha') | |
fi | |
GIT_CHECK_EXCLUDE="./vendor" git-validation -range "${DCO_RANGE}" -run DCO,short-subject,dangling-whitespace | |
- name: Vendor Check | |
working-directory: src/github.com/estesp/bucketbench | |
run: ./hack/vendor.sh | |
- name: Test Build | |
run: | | |
make binary | |
working-directory: src/github.com/estesp/bucketbench |