Merge pull request #285 from andyzhangx/codespell
test: add codespell shellcheck github actions
This commit is contained in:
commit
f48c0684a8
15
.github/workflows/codespell.yml
vendored
Normal file
15
.github/workflows/codespell.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
# GitHub Action to automate the identification of common misspellings in text files.
|
||||
# https://github.com/codespell-project/actions-codespell
|
||||
# https://github.com/codespell-project/codespell
|
||||
name: codespell
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
codespell:
|
||||
name: Check for spelling errors
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: codespell-project/actions-codespell@master
|
||||
with:
|
||||
check_filenames: true
|
||||
skip: ./.git,./.github/workflows/codespell.yml,.git,*.png,*.jpg,*.svg,*.sum,./vendor,go.sum,./release-tools/prow.sh
|
||||
29
.github/workflows/shellcheck.yaml
vendored
Normal file
29
.github/workflows/shellcheck.yaml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
name: ShellCheck
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
|
||||
jobs:
|
||||
shellcheck:
|
||||
name: Shellcheck
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run ShellCheck
|
||||
uses: ludeeus/action-shellcheck@master
|
||||
env:
|
||||
SHELLCHECK_OPTS: -e SC2034
|
||||
with:
|
||||
severity: warning
|
||||
check_together: 'yes'
|
||||
disable_matcher: false
|
||||
ignore_paths: vendor release-tools hack
|
||||
format: gcc
|
||||
4
.prow.sh
4
.prow.sh
@ -1,3 +1,5 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Copyright 2020 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -12,8 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#! /bin/bash
|
||||
|
||||
# A Prow job can override these defaults, but this shouldn't be necessary.
|
||||
|
||||
# Only these tests make sense for csi-driver-nfs until we can integrate k/k
|
||||
|
||||
@ -15,7 +15,7 @@ $ kubectl logs csi-nfs-controller-56bfddd689-dh5tk -c nfs -n kube-system > csi-n
|
||||
> note: there could be multiple controller pods, if there are no helpful logs, try to get logs from other controller pods
|
||||
|
||||
### Case#2: volume mount/unmount failed
|
||||
- locate csi driver pod and figure out which pod does tha actual volume mount/unmount
|
||||
- locate csi driver pod that does the actual volume mount/unmount
|
||||
|
||||
```console
|
||||
$ kubectl get pod -o wide -n kube-system | grep csi-nfs-node
|
||||
|
||||
@ -44,7 +44,7 @@ func (t *DynamicallyProvisionedReclaimPolicyTest) Run(client clientset.Interface
|
||||
if tpvc.ReclaimPolicy() == v1.PersistentVolumeReclaimRetain {
|
||||
tpvc.WaitForPersistentVolumePhase(v1.VolumeReleased)
|
||||
tpvc.DeleteBoundPersistentVolume()
|
||||
// The controler server cannot resolve the nfs server hosting inside the testing k8s cluster, skipping the cleanup step.
|
||||
// The controller server cannot resolve the nfs server hosting inside the testing k8s cluster, skipping the cleanup step.
|
||||
// tpvc.DeleteBackingVolume(&t.ControllerServer)
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ var podFailedCondition = func(pod *v1.Pod) (bool, error) {
|
||||
ginkgo.By("Saw pod failure")
|
||||
return true, nil
|
||||
case v1.PodSucceeded:
|
||||
return true, fmt.Errorf("pod %q successed with reason: %q, message: %q", pod.Name, pod.Status.Reason, pod.Status.Message)
|
||||
return true, fmt.Errorf("pod %q succeeded with reason: %q, message: %q", pod.Name, pod.Status.Reason, pod.Status.Message)
|
||||
default:
|
||||
return false, nil
|
||||
}
|
||||
|
||||
@ -32,14 +32,14 @@ function provision_nfs_server {
|
||||
echo 'Installing NFS server on localhost'
|
||||
apt-get update -y
|
||||
apt-get install -y nfs-common
|
||||
docker run -d --name nfs --privileged -p 2049:2049 -v $(pwd)/nfsshare:/nfsshare -e SHARED_DIRECTORY=/nfsshare itsthenetwork/nfs-server-alpine:latest
|
||||
docker run -d --name nfs --privileged -p 2049:2049 -v "$(pwd)"/nfsshare:/nfsshare -e SHARED_DIRECTORY=/nfsshare itsthenetwork/nfs-server-alpine:latest
|
||||
}
|
||||
|
||||
provision_nfs_server
|
||||
|
||||
readonly CSC_BIN="$GOBIN/csc"
|
||||
readonly cap="1,mount,"
|
||||
readonly volname="citest-$(date +%s)"
|
||||
volname="citest-$(date +%s)"
|
||||
readonly volsize="2147483648"
|
||||
readonly endpoint="unix:///tmp/csi.sock"
|
||||
readonly target_path="/tmp/targetpath"
|
||||
@ -70,6 +70,7 @@ echo "publish volume test:"
|
||||
"$CSC_BIN" node publish --endpoint "$endpoint" --cap "$cap" --vol-context "$params" --target-path "$target_path" "$volumeid"
|
||||
sleep 2
|
||||
|
||||
declare staging_target_path
|
||||
echo "node stats test:"
|
||||
csc node stats --endpoint "$endpoint" "$volumeid:$target_path:$staging_target_path"
|
||||
sleep 2
|
||||
|
||||
@ -42,7 +42,7 @@ function provision_nfs_server {
|
||||
echo 'Installing NFS server on localhost'
|
||||
apt-get update -y
|
||||
apt-get install -y nfs-common
|
||||
docker run -d --name nfs --privileged -p 2049:2049 -v $(pwd)/nfsshare:/nfsshare -e SHARED_DIRECTORY=/nfsshare itsthenetwork/nfs-server-alpine:latest
|
||||
docker run -d --name nfs --privileged -p 2049:2049 -v "$(pwd)"/nfsshare:/nfsshare -e SHARED_DIRECTORY=/nfsshare itsthenetwork/nfs-server-alpine:latest
|
||||
}
|
||||
|
||||
provision_nfs_server
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2020 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -12,8 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "check the driver pods if restarts ..."
|
||||
@ -28,4 +28,4 @@ do
|
||||
fi
|
||||
done
|
||||
echo "no driver pods have restarted"
|
||||
echo "======================================================================================"
|
||||
echo "======================================================================================"
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2020 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -12,8 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
NS=kube-system
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user