Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/lint-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ jobs:
- name: Verify commit signed-off
run: |
set -eu -o pipefail
COMMITS=$(git rev-list ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }})
if [ "${{ github.event_name }}" = "pull_request" ]; then
COMMITS=$(git rev-list ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }})
else
COMMITS="${{ github.sha }}"
fi
for commit in $COMMITS; do
commit_msg=$(git log --format=%B -n 1 $commit)
if ! echo "$commit_msg" | grep -qE "^Signed-off-by: .+ <.+@.+>$"; then
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/test-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ jobs:
- name: Build for every commit
run: |
set -eu -o pipefail
COMMITS=$(git rev-list ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }})
if [ "${{ github.event_name }}" = "pull_request" ]; then
COMMITS=$(git rev-list ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }})
else
COMMITS="${{ github.sha }}"
fi
for commit in $COMMITS ; do
git checkout $commit || exit 1
go build ./...
Expand Down Expand Up @@ -66,7 +70,11 @@ jobs:
- name: Run unit test for every commit
run: |
set -eu -o pipefail
COMMITS=$(git rev-list ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }})
if [ "${{ github.event_name }}" = "pull_request" ]; then
COMMITS=$(git rev-list ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }})
else
COMMITS="${{ github.sha }}"
fi
for commit in $COMMITS ; do
git checkout $commit || exit 1
make test
Expand Down Expand Up @@ -98,7 +106,11 @@ jobs:
- name: Run CLI tests for every commit
run: |
set -eu -o pipefail
COMMITS=$(git rev-list ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }})
if [ "${{ github.event_name }}" = "pull_request" ]; then
COMMITS=$(git rev-list ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }})
else
COMMITS="${{ github.sha }}"
fi
for commit in $COMMITS ; do
git checkout $commit || exit 1
make cli-test clean
Expand Down
Loading