Skip to content

chore(deps): update ghcr.io/platform-mesh/component-descriptors/github.com/platform-mesh/platform-mesh docker tag to v0.3.0-build.421 #3634

chore(deps): update ghcr.io/platform-mesh/component-descriptors/github.com/platform-mesh/platform-mesh docker tag to v0.3.0-build.421

chore(deps): update ghcr.io/platform-mesh/component-descriptors/github.com/platform-mesh/platform-mesh docker tag to v0.3.0-build.421 #3634

name: test-local-setup
permissions:
contents: read
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
checkout-and-detect-changes:
runs-on: ubuntu-latest-large
outputs:
local_setup_changed: ${{ steps.local_setup.outputs.changed }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- name: Did local-setup change?
id: local_setup
run: |
if git diff --quiet origin/${{ github.base_ref }} -- local-setup; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
kind-localsetup:
needs: checkout-and-detect-changes
runs-on: ubuntu-latest-large
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- name: Skip when unchanged
if: needs.checkout-and-detect-changes.outputs.local_setup_changed == 'false'
run: echo "local-setup unchanged"
- name: Install the gh cli
if: needs.checkout-and-detect-changes.outputs.local_setup_changed == 'true'
uses: ksivamuthu/actions-setup-gh-cli@c78dbed4be2f8d6133a14a9a597ee12fd4ed5c93 # v3
with:
version: 2.24.3
- name: Install Task
if: needs.checkout-and-detect-changes.outputs.local_setup_changed == 'true'
uses: arduino/setup-task@v2
with:
version: 3.44.1
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install kubectl kcp plugins
if: needs.checkout-and-detect-changes.outputs.local_setup_changed == 'true'
run: |
set -e
( set -x; cd "$(mktemp -d)" && curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/krew-linux_amd64.tar.gz" && tar zxvf krew-linux_amd64.tar.gz && KREW_ROOT="$HOME/.krew" ./krew-linux_amd64 install krew )
echo "$HOME/.krew/bin" >> $GITHUB_PATH
export PATH="$HOME/.krew/bin:$PATH"
kubectl krew index add kcp-dev https://github.com/kcp-dev/krew-index.git
kubectl krew install kcp-dev/kcp
kubectl krew install kcp-dev/ws
kubectl krew install kcp-dev/create-workspace
- name: Run local-setup with example data
if: needs.checkout-and-detect-changes.outputs.local_setup_changed == 'true'
run: |
task local-setup:example-data
- name: Check/wait for all components to be ready
if: needs.checkout-and-detect-changes.outputs.local_setup_changed == 'true'
run: |
sleep 10
kubectl wait --for=condition=ready --timeout=10m component --all -A
kubectl wait --for=condition=ready --timeout=10m resource --all -A
kubectl wait --for=condition=ready --timeout=10m hr --all -A
kubectl wait --for=condition=Available --timeout=10m deployment --all -A
# Step 7: Prepare the NodeJS/playwright environment
- name: Cache node modules
if: needs.checkout-and-detect-changes.outputs.local_setup_changed == 'true'
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
with:
path: ~/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
# Step 8: Install NodeJS and dependencies
- name: Node ${{ matrix.node-version }}
if: needs.checkout-and-detect-changes.outputs.local_setup_changed == 'true'
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'local-setup/e2e'
# Step 9: Install npm dependencies
- name: Clean install of npm dependencies
if: needs.checkout-and-detect-changes.outputs.local_setup_changed == 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
task test:portal-e2e:video
- name: Upload Playwright artefacts
if: failure()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: playwright-artifacts
path: |
local-setup/e2e/test-results/
local-setup/e2e/*.png
retention-days: 5