Skip to content

Fix #117 Updating PostgreSQL version #348

Fix #117 Updating PostgreSQL version

Fix #117 Updating PostgreSQL version #348

Workflow file for this run

---
name: Continuous integration
on:
pull_request:
branches:
- "**"
push:
branches:
- "main"
jobs:
build:
name: Build operator
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
rust:
- 1.67.0
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --all-features
build-no-default-features:
name: Build operator with no features enabled
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
# We do not need to build across all supported versions the minimum supported rust version is
# enough. This check is here to detect conflict with the compiler feature flag.
rust:
- 1.67.0
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --no-default-features
test:
name: Test operator
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
rust:
- 1.67.0
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- uses: actions-rs/cargo@v1
with:
command: install
args: cargo-tarpaulin
- uses: actions-rs/cargo@v1
with:
command: tarpaulin
args: --verbose --all-features
format:
name: Format source code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --verbose --all -- --check
clippy:
name: Lint source code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --verbose --all-features -- -D warnings
doc:
name: Build documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- uses: actions-rs/cargo@v1
with:
command: doc
args: --verbose
docker-build-and-push:
name: Docker build and push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v2
with:
context: .
push: 'true'
tags: clevercloud/clever-operator:${{ github.sha }}
docker-build-and-push-openshift-manifest:
name: Docker build and push openshift manifest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v2
with:
context: deployments/operator-lifecycle-manager/bundle-0.5.5
push: 'true'
tags: clevercloud/clever-operator-manifest:${{ github.sha }}
file: deployments/operator-lifecycle-manager/bundle-0.5.5/bundle.Dockerfile
kubernetes-deployment-scripts-validation:
name: Kubernetes validate deployment scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: piraces/kube-score-ga@v0.1.2
with:
manifests-folders: 'deployments/kubernetes/v1.24.0/*.yml'
kubernetes-deployment:
name: Create a minikube and install the operator
runs-on: ubuntu-latest
needs:
- kubernetes-deployment-scripts-validation
- docker-build-and-push
steps:
- uses: actions/checkout@v2
- uses: medyagh/setup-minikube@master
- run: kubectl apply -f deployments/kubernetes/v1.24.0
openshift-deployment:
name: Create a minikube, install openshift and install the operator
runs-on: ubuntu-latest
needs:
- kubernetes-deployment-scripts-validation
- docker-build-and-push-openshift-manifest
- docker-build-and-push
steps:
- uses: actions/checkout@v2
- uses: medyagh/setup-minikube@master
- run: curl -L -vvv https://github.com/operator-framework/operator-sdk/releases/download/v1.25.2/operator-sdk_linux_amd64 > /tmp/operator-sdk && chmod +x /tmp/operator-sdk
- run: /tmp/operator-sdk olm install --verbose --timeout 30m
- run: /tmp/operator-sdk run bundle --verbose --timeout 30m 'docker.io/clevercloud/clever-operator-manifest:${{ github.sha }}'
...