Merge pull request #43 from rustrial/feature/upgrade-to-1-32 #98
This file contains hidden or 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: build | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- "*" | |
workflow_dispatch: | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
- name: Format source | |
run: "cargo +stable fmt" | |
- name: Generate Custome Resource Definitions (CRDs) | |
run: "cargo run --example gen-crds > charts/k8s-aws-iam-controller/crds/crds.yaml" | |
- name: Check if working tree is dirty | |
run: | | |
if [[ $(git diff --stat) != '' ]]; then | |
git --no-pager diff | |
echo 'cargo run --example gen-crds > charts/k8s-aws-iam-controller/crds/crds.yaml' | |
exit 1 | |
fi | |
- name: Unit Tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
- name: Setup Kubernetes | |
uses: helm/[email protected] | |
with: | |
version: "v0.26.0" # https://github.com/kubernetes-sigs/kind/releases | |
node_image: "kindest/node:v1.32.0" | |
cluster_name: kind | |
- name: Setup Helm | |
uses: fluxcd/pkg/actions/helm@main | |
- name: Setup Kubectl | |
uses: fluxcd/pkg/actions/kubectl@main | |
- name: Install from local image | |
run: ./.github/install.sh | |
- name: Run e2e tests | |
run: ./.github/e2e-tests.sh |