Skip to content

fix(deps): update node.js to v20.7.0 #223

fix(deps): update node.js to v20.7.0

fix(deps): update node.js to v20.7.0 #223

Workflow file for this run

name: Run Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
check-generate:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check that generated artifacts are up-to-date
run: |
make generate
echo "Running 'git status' ..."
git status --porcelain | tee status.out
if [[ -s status.out ]]; then
echo "Generated artifacts are not up-to-date; probably 'make generate' was not run before committing"
exit 1
else
echo "Generated artifacts are up-to-date"
fi
test-scaffold:
runs-on: ubuntu-22.04
needs: check-generate
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Build scaffold
run: |
go build -o bin/scaffold -ldflags "-X \"main.version=$(pwd)\"" ./scaffold
echo "Running 'scaffold --version' ..."
bin/scaffold --version
- name: Run scaffold (without admission webhooks)
run: |
rm -rf $RUNNER_TEMP/src
mkdir $RUNNER_TEMP/src
./bin/scaffold \
--group-name example.io \
--group-version v1alpha1 \
--kind MyComponent \
--operator-name mycomponent-operator.example.io \
--go-module example.io/mycomponent-operator \
--image mycomponent-operator:latest \
$RUNNER_TEMP/src
- name: Build generated operator (without admission webhooks)
run: |
cd $RUNNER_TEMP/src
make build
- name: Test generated operator (without admission webhooks)
run: |
cd $RUNNER_TEMP/src
make test
- name: Validate generation of typed client (without admission webhooks)
run: |
cd $RUNNER_TEMP/src
make generate-client
- name: Run scaffold (with admission webhooks)
run: |
rm -rf $RUNNER_TEMP/src
mkdir $RUNNER_TEMP/src
./bin/scaffold \
--group-name example.io \
--group-version v1alpha1 \
--kind MyComponent \
--with-validating-webhook \
--with-mutating-webhook \
--operator-name mycomponent-operator.example.io \
--go-module example.io/mycomponent-operator \
--image mycomponent-operator:latest \
$RUNNER_TEMP/src
- name: Build generated operator (with admission webhooks)
run: |
cd $RUNNER_TEMP/src
make build
- name: Test generated operator (with admission webhooks)
run: |
cd $RUNNER_TEMP/src
make test
- name: Validate generation of typed client (with admission webhooks)
run: |
cd $RUNNER_TEMP/src
make generate-client
# commented out until github runners have docker 23.0
# - name: Validate docker build
# run: |
# cd $RUNNER_TEMP/src
# make docker-build