mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-08-25 00:47:27 +00:00
49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
on: [push, pull_request]
|
|
|
|
name: Acceptance tests
|
|
|
|
env:
|
|
KUBESHARK_CI_IMAGE: kubeshark/ci:0.0
|
|
|
|
jobs:
|
|
run-acceptance-tests:
|
|
name: Run acceptance tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go 1.17
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '^1.17'
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Build
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: .
|
|
push: false
|
|
load: true
|
|
tags: ${{ env.KUBESHARK_CI_IMAGE }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
|
|
- name: Setup acceptance test
|
|
run: ./acceptanceTests/setup.sh
|
|
|
|
- name: Create k8s users and change context
|
|
env:
|
|
USERNAME_UNRESTRICTED: user-with-clusterwide-access
|
|
USERNAME_RESTRICTED: user-with-restricted-access
|
|
run: |
|
|
./acceptanceTests/create_user.sh "${USERNAME_UNRESTRICTED}"
|
|
./acceptanceTests/create_user.sh "${USERNAME_RESTRICTED}"
|
|
kubectl apply -f cli/cmd/permissionFiles/permissions-all-namespaces-tap.yaml
|
|
kubectl config use-context ${USERNAME_UNRESTRICTED}
|
|
|
|
- name: Test
|
|
run: make acceptance-test
|