Skip to content

chore: robust e2e test to run on prs #2

chore: robust e2e test to run on prs

chore: robust e2e test to run on prs #2

Workflow file for this run

name: e2e Test
permissions: read-all
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
e2e:
name: e2e
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: clone kfc
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: defenseunicorns/kubernetes-fluent-client
path: kubernetes-fluent-client
- name: "set env: KFC"
run: echo "KFC=${GITHUB_WORKSPACE}/kubernetes-fluent-client" >> "$GITHUB_ENV"
- name: setup node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20
cache: "npm"
cache-dependency-path: kubernetes-fluent-client
- name: install kubernetes-fluent-client deps
run: |
cd "$KFC"
npm ci
- name: "install k3d"
run: "curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash"
shell: bash
- name: Set up Kubernetes
uses: azure/setup-kubectl@3e0aec4d80787158d308d7b364cb1b702e7feb7f # v4.0.0
with:
version: "latest"
- name: Run the e2es
run: |
cd "$KFC"
npm run test:e2e:run