Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
Fix the broken CI process
Browse files Browse the repository at this point in the history
  • Loading branch information
skx committed Jan 21, 2024
1 parent a52cd8e commit c0dd519
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/build
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
# The basename of our binary
BASE="rss2hook"


# I don't even ..
go env -w GOFLAGS="-buildvcs=false"

#
# We build on only a single platform/arch.
#
Expand Down
34 changes: 31 additions & 3 deletions .github/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,36 @@
#!/bin/sh

# Install the lint-tool, and the shadow-tool
go get -u golang.org/x/lint/golint
go get -u golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow

# I don't even ..
go env -w GOFLAGS="-buildvcs=false"


# Install the tools we use to test our code-quality.
#
# Here we setup the tools to install only if the "CI" environmental variable
# is not empty. This is because locally I have them installed.
#
# NOTE: Github Actions always set CI=true
#
if [ ! -z "${CI}" ] ; then
go install golang.org/x/lint/golint@latest
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
fi


# Run the static-check tool - we ignore errors in goserver/static.go
t=$(mktemp)
staticcheck -checks all ./... | grep -v "is deprecated"> $t
if [ -s $t ]; then
echo "Found errors via 'staticcheck'"
cat $t
rm $t
exit 1
fi
rm $t



# At this point failures cause aborts
set -e
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Generate the artifacts
uses: skx/github-action-build@master
- name: Upload
uses: skx/github-action-publish-binaries@master
env:
Expand Down

0 comments on commit c0dd519

Please sign in to comment.