Use controller-runtime to reconsturct spark operator #2
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: Release 2.0 | ||
on: | ||
pull_requests: | ||
branches: | ||
- release-2.* | ||
push: | ||
branches: | ||
- release-2.* | ||
jobs: | ||
build-api-docs: | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
- name: The API documentation hasn't changed | ||
run: | | ||
make build-api-docs | ||
if ! git diff --quiet -- docs/api-docs.md; then | ||
echo "Need to re-run \"make build-api-docs\" and commit the changes" | ||
git diff -- docs/api-docs.md; | ||
false | ||
fi | ||
build-sparkctl: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
- name: Set up Go environment | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Build sparkctl | ||
run: make build-sparkctl | ||
build-spark-operator: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
- name: Setup Go environment | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Run go fmt check | ||
run: make go-fmt | ||
- name: Run go vet check | ||
run: make go-vet | ||
# - name: Run golangci-lint linter | ||
# run: make golangci-lint | ||
- name: Run unit tests | ||
run: make unit-test | ||
- name: Create kind cluster | ||
if: steps.list-changed.outputs.changed == 'true' | ||
uses: helm/kind-action@v1.10.0 | ||
with: | ||
config: charts/spark-operator-chart/ci/kind-config.yaml | ||
- name: Run e2e tests | ||
run: make e2e-test | ||
- name: Build Spark operator Docker Image | ||
run: make docker-build IMAGE_TAG=latest | ||
build-helm-chart: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v4.2.0 | ||
with: | ||
version: v3.14.4 | ||
- name: Run helm unit tests | ||
run: make helm-unittest | ||
- name: Set up chart-testing | ||
uses: helm/chart-testing-action@v2.7.0 | ||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --target-branch ${{ github.ref }}) | ||
if [[ -n "$changed" ]]; then | ||
echo "changed=true" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Run chart-testing (lint) | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: ct lint --target-branch ${{ github.ref }} | ||
- name: Create kind cluster | ||
if: steps.list-changed.outputs.changed == 'true' | ||
uses: helm/kind-action@v1.10.0 | ||
with: | ||
config: charts/spark-operator-chart/ci/kind-config.yaml | ||
- name: Run chart-testing (install) | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: ct install --target-branch ${{ github.ref }} |