mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-24 18:50:58 +08:00
Avastancu/arc e2e test linux vm (#2285)
This commit is contained in:
36
.github/actions/e2e-arc-test/action.yaml
vendored
Normal file
36
.github/actions/e2e-arc-test/action.yaml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: 'E2E ARC Test Action'
|
||||
description: 'Includes common arc installation, setup and test file run'
|
||||
|
||||
inputs:
|
||||
github-token:
|
||||
description: 'JWT generated with Github App inputs'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install ARC
|
||||
run: helm install arc --namespace "arc-systems" --create-namespace ./charts/actions-runner-controller-2
|
||||
shell: bash
|
||||
- name: Get datetime
|
||||
# We are using this value further in the runner installation to avoid runner name collision that are a risk with hard coded values.
|
||||
# A datetime including the 3 nanoseconds are a good option for this and also adds to readability and runner sorting if needed.
|
||||
run: echo "DATE_TIME=$(date +'%Y-%m-%d-%H-%M-%S-%3N')" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
- name: Install runners
|
||||
run: |
|
||||
helm install "arc-runner-${{ env.DATE_TIME }}" \
|
||||
--namespace "arc-runners" \
|
||||
--create-namespace \
|
||||
--set githubConfigUrl="https://github.com/actions/actions-runner-controller" \
|
||||
--set githubConfigSecret.github_token="${{ inputs.github-token }}" \
|
||||
./charts/auto-scaling-runner-set \
|
||||
--debug
|
||||
kubectl get pods -A
|
||||
shell: bash
|
||||
- name: Test ARC scales pods up and down
|
||||
run: |
|
||||
export GITHUB_TOKEN="${{ inputs.github-token }}"
|
||||
export DATE_TIME="${{ env.DATE_TIME }}"
|
||||
go test ./test_e2e_arc -v
|
||||
shell: bash
|
||||
@@ -1,4 +1,4 @@
|
||||
name: ARC-REUSABLE-WORKFLOW
|
||||
name: ARC Reusable Workflow
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
|
||||
23
.github/workflows/e2e-test-linux-vm.yaml
vendored
Normal file
23
.github/workflows/e2e-test-linux-vm.yaml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: CI ARC E2E Linux VM Test
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
setup-steps:
|
||||
runs-on: [ubuntu-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Create Kind cluster
|
||||
run: |
|
||||
PATH=$(go env GOPATH)/bin:$PATH
|
||||
kind create cluster --name e2e-test
|
||||
- name: Get Token
|
||||
id: get_workflow_token
|
||||
uses: peter-murray/workflow-application-token-action@8e1ba3bf1619726336414f1014e37f17fbadf1db
|
||||
with:
|
||||
application_id: ${{ secrets.ACTIONS_ACCESS_APP_ID }}
|
||||
application_private_key: ${{ secrets.ACTIONS_ACCESS_PK }}
|
||||
- uses: ./.github/actions/e2e-arc-test
|
||||
with:
|
||||
github-token: ${{ steps.get_workflow_token.outputs.token }}
|
||||
Reference in New Issue
Block a user