Add redis sentinel integration tests #277
Workflow file for this run
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
name: Validate Examples | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
validate-examples: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install yamllint | |
run: sudo apt-get install -y yamllint | |
- name: Lint YAML files | |
run: yamllint --strict ./example | |
- name: Install kubectl | |
run: | | |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | |
chmod +x kubectl | |
sudo mv kubectl /usr/local/bin/ | |
- name: Create k8s Kind Cluster | |
uses: helm/[email protected] | |
with: | |
cluster_name: kind | |
- name: Apply CRD | |
run: | | |
for crd in $(find ./config/crd/bases -type f -name '*.yaml'); do | |
kubectl create -f $crd | |
done | |
- name: Validate CRD Installation | |
run: | | |
CRDs=("redis" "redissentinels" "redisclusters" "redisreplications") | |
for crd in "${CRDs[@]}"; do | |
kubectl get crd $crd.redis.redis.opstreelabs.in || exit 1 | |
done | |
- name: Validate CR | |
run: | | |
for example in $(find ./example -type f -name '*.yaml'); do | |
kubectl apply --dry-run=server -f $example | |
done |