Skip to content

CF Acceptance Tests on KinD #82

CF Acceptance Tests on KinD

CF Acceptance Tests on KinD #82

Workflow file for this run

name: CF Acceptance Tests on KinD
on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:
jobs:
kind-cats:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v6
- name: Set kernel settings
run: |
docker run --rm \
--privileged \
--pid host \
-v /lib/modules:/lib/modules:ro \
alpine sh -c "sysctl -w fs.inotify.max_user_instances=512 && modprobe nfs && modprobe nfsd"
- name: Install dependencies
run: |
mkdir -p $HOME/.local/bin && echo "$HOME/.local/bin" >> "$GITHUB_PATH"
curl -L "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=${CF_CLI_VERSION}&source=github" | tar -zx
mv cf8 $HOME/.local/bin/cf
env:
CF_CLI_VERSION: "8.18.3"
- name: setup Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: false
- name: checkout kind-deployment
uses: actions/checkout@v6
with:
repository: "cloudfoundry/kind-deployment"
path: "kind"
- name: Run make up
run: |
cd kind && make up
- name: Login
run: cd kind && make login
- name: Init
run: cd kind && make bootstrap-complete
- name: Build cnbapplifecycle.tgz
run: make copy-binaries package
- name: Load updated cnbapplifecycle.tgz into kind
run: |
kubectl cp bin/cnb_app_lifecycle.tgz \
cf-system/$(kubectl get pod -n cf-system -l app.kubernetes.io/name=fileserver \
-o jsonpath='{.items[0].metadata.name}'):fileserver/v1/static/cnb_app_lifecycle/cnb_app_lifecycle.tgz
- name: checkout CF test repository
uses: actions/checkout@v6
with:
repository: "cloudfoundry/cf-acceptance-tests"
ref: develop
path: "cf-acceptance-tests"
- name: setup Python
uses: actions/setup-python@v6
with:
python-version: "3"
- name: templating config
shell: bash
run: |
source kind/temp/secrets.sh
python3 -c 'import os,sys;[sys.stdout.write(os.path.expandvars(l)) for l in sys.stdin]' < ./.github/cats-config.tpl > ./.github/cats-config.json
- name: run CATS
env:
CONFIG: "${{ github.workspace }}/.github/cats-config.json"
GINKGO_NO_COLOR: "true"
run: |
./cf-acceptance-tests/bin/test --no-color --github-output --timeout=180m --procs=4 --flake-attempts=2 --json-report report.json
- uses: actions/upload-artifact@v7
if: always()
with:
name: report
path: ./cf-acceptance-tests/report.json