diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index e742426..2de5a21 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,9 +1,12 @@ on: workflow_dispatch: inputs: - token: + hcloud_token: description: 'Hetzner Cloud API token' required: true + e2e_file_name: + description: 'Name of the e2e test file, example v1.30*' + required: false jobs: e2e: @@ -17,4 +20,5 @@ jobs: - run: ssh-keygen -t rsa -q -f "$HOME/.ssh/id_rsa" -N "" - run: make e2e branch=${{ github.base_ref || github.ref_name }} env: - HCLOUD_TOKEN: ${{ github.event.inputs.token }} \ No newline at end of file + HCLOUD_TOKEN: ${{ github.event.inputs.hcloud_token }} + E2E_FILE_NAME: ${{ github.event.inputs.e2e_file_name }} \ No newline at end of file diff --git a/e2e/e2e_test.go b/e2e/e2e_test.go index 09a6d42..11cf128 100644 --- a/e2e/e2e_test.go +++ b/e2e/e2e_test.go @@ -40,7 +40,12 @@ func Test(t *testing.T) { //nolint:funlen,paralleltest,cyclop log.SetLevel(log.WarnLevel) - tests, err := filepath.Glob("./configs/*.yaml") + nameGlob := os.Getenv("E2E_FILE_NAME") + if nameGlob == "" { + nameGlob = "*" + } + + tests, err := filepath.Glob("./configs/" + nameGlob + ".yaml") if err != nil { t.Fatal(err) }