mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-08-19 04:16:35 +00:00
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: Acceptance tests on PR
|
|
|
|
on: push
|
|
|
|
env:
|
|
MIZU_CI_IMAGE: mizu/ci:0.0
|
|
|
|
concurrency:
|
|
group: acceptance-tests-on-pr-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
run-tests:
|
|
name: Run tests
|
|
runs-on: ubuntu-latest
|
|
if: ${{ contains(github.event.head_commit.message, '#run_acceptance_tests') }}
|
|
|
|
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.MIZU_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
|