-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The static checks were using the version from kata-containers, an old version of go and had a bunch of travis references that don't seem to be required any longer, so try updating this and removing the redundant code. Whether all these checks are useful is debatable, but at least now they should be up-to-date. Signed-off-by: stevenhorsman <steven@uk.ibm.com>
- Loading branch information
1 parent
00128d3
commit 45f72f3
Showing
5 changed files
with
40 additions
and
92 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,42 +1,22 @@ | ||
on: ["pull_request"] | ||
name: Static checks | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
static-checks: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
GO111MODULE: off | ||
TRAVIS: "true" | ||
TRAVIS_BRANCH: ${{ github.base_ref }} | ||
TRAVIS_PULL_REQUEST_BRANCH: ${{ github.head_ref }} | ||
TRAVIS_PULL_REQUEST_SHA : ${{ github.event.pull_request.head.sha }} | ||
GOPATH: ${{ github.workspace }} | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.19.3 | ||
- name: Setup GOPATH | ||
run: | | ||
gopath_org=$(go env GOPATH)/src/github.com/kata-containers/ | ||
mkdir -p ${gopath_org} | ||
ln -s ${PWD} ${gopath_org} | ||
echo "TRAVIS_BRANCH: ${TRAVIS_BRANCH}" | ||
echo "TRAVIS_PULL_REQUEST_BRANCH: ${TRAVIS_PULL_REQUEST_BRANCH}" | ||
echo "TRAVIS_PULL_REQUEST_SHA: ${TRAVIS_PULL_REQUEST_SHA}" | ||
echo "TRAVIS: ${TRAVIS}" | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup travis references | ||
run: | | ||
echo "TRAVIS_BRANCH=${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = \"/\" } ; { print $3 }')}" | ||
- name: Setup | ||
run: | | ||
community_repo=$(go env GOPATH)/src/github.com/kata-containers/community | ||
pushd ${community_repo} | ||
GOPATH=$(go env GOPATH) .ci/setup.sh | ||
- name: Running static checks | ||
run: | | ||
community_repo=$(go env GOPATH)/src/github.com/kata-containers/community | ||
pushd ${community_repo} | ||
GOPATH=$(go env GOPATH) .ci/static-checks.sh | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
path: ./src/github.com/${{ github.repository }} | ||
|
||
- name: Install system dependencies | ||
run: | | ||
sudo apt-get -y install moreutils hunspell hunspell-en-gb hunspell-en-us pandoc | ||
- name: Running static checks | ||
run: | | ||
export PATH=${PATH}:${GOPATH}/bin | ||
./src/github.com/${{ github.repository }}/.ci/static-checks.sh |