diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a55282c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: ci + +on: + push: + schedule: + - cron: '0 4 * * *' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pipenv + pipenv install --dev --deploy + - name: Formatting + run: | + # check that the source files are formatted correctly + pipenv run yapf -q *.py + - name: Linting + run: | + pipenv run pylint *.py diff --git a/README.md b/README.md index e59e16d..e1ee740 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # kube-stale-resources +![Build Status](https://github.com/cmur2/kube-stale-resources/workflows/ci/badge.svg) + This is a utility to detect stale resources in [Kubernetes](https://kubernetes.io/) clusters between resources from YAML manifests supplied via local file or stdin (target state) and a Kubernetes cluster (live state). All resources that exist in the live state but not in the target state are considered *stale* as they deviate from the intended state of the Kubernetes cluster (closed world assumption). It is intended as a complement to [kubectl diff](https://kubernetes.io/blog/2019/01/14/apiserver-dry-run-and-kubectl-diff/).