Skip to content

Commit 7c90ae1

Browse files
feat: add weekly end-to-end test workflows for all devops-infra GitHub Actions (#1)
* Initial plan * feat: add end-to-end test workflows for all devops-infra actions Agent-Logs-Url: https://github.com/devops-infra/end-to-end-tests/sessions/b430f53f-9c34-435e-b906-a500c6daf9ed Co-authored-by: ChristophShyper <45788587+ChristophShyper@users.noreply.github.com> * test: add repository and repository_path coverage in action-pull-request e2e workflow Agent-Logs-Url: https://github.com/devops-infra/end-to-end-tests/sessions/dd39da71-3100-4bc0-90b0-bda2c04dfa4f Co-authored-by: ChristophShyper <45788587+ChristophShyper@users.noreply.github.com> * feat: enhance end-to-end testing framework with new workflows and coverage reporting * refactor: update repository references to Triglav in documentation and scripts * refactor: update repository references to Triglav in documentation and scripts * feat: add end-to-end testing workflows with mode validation and action reference updates * feat: add end-to-end testing workflows and refine input handling * feat: add execution mode and image tag inputs to workflow dispatch for E2E actions * feat: enhance action input parsing and add unit tests for coverage * feat: add validation for mode input and handle empty action repositories in workflows * feat: add input validation for mode in end-to-end workflows and handle invalid JSON in baseline * fix: validate mode input for end-to-end testing workflow * fix: update Alpine image version to 3.23.4 in end-to-end testing workflows * feat: add preflight validation step for workflow inputs in end-to-end testing --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ChristophShyper <45788587+ChristophShyper@users.noreply.github.com>
1 parent c73b180 commit 7c90ae1

24 files changed

Lines changed: 3024 additions & 35 deletions

.env.example

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
DOCKER_USERNAME=your-dockerhub-user
2-
DOCKER_ORG_NAME=your-dockerhub-org
3-
DOCKER_TOKEN=your-docker-token
4-
GITHUB_USERNAME=your-github-user
5-
GITHUB_ORG_NAME=your-github-org
6-
GITHUB_TOKEN=your-github-token
1+
GITHUB_TOKEN=your_github_token_here
2+
GH_REPO=devops-infra/triglav

.github/workflows/auto-pull-request-create.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- main
88
- release/**
99
- dependabot/**
10+
- test/**
1011

1112
permissions:
1213
contents: read
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: (Cron) End-to-End Tests
2+
3+
on:
4+
schedule:
5+
- cron: 0 6 * * 1
6+
workflow_dispatch:
7+
inputs:
8+
mode:
9+
description: Run mode (ref or image)
10+
required: false
11+
default: ref
12+
type: choice
13+
options:
14+
- ref
15+
- image
16+
image_tag:
17+
description: Action image tag used when mode=image (for example v1.2.3-test or v1.2.3-rc)
18+
required: false
19+
default: ''
20+
type: string
21+
22+
permissions:
23+
contents: read
24+
25+
jobs:
26+
action-commit-push:
27+
permissions:
28+
contents: write
29+
uses: ./.github/workflows/e2e-action-commit-push.yml
30+
with:
31+
mode: ${{ github.event_name == 'workflow_dispatch' && inputs.mode || 'ref' }}
32+
image_tag: ${{ github.event_name == 'workflow_dispatch' && inputs.image_tag || '' }}
33+
secrets: inherit
34+
35+
action-pull-request:
36+
permissions:
37+
contents: write
38+
pull-requests: write
39+
issues: write
40+
uses: ./.github/workflows/e2e-action-pull-request.yml
41+
with:
42+
mode: ${{ github.event_name == 'workflow_dispatch' && inputs.mode || 'ref' }}
43+
image_tag: ${{ github.event_name == 'workflow_dispatch' && inputs.image_tag || '' }}
44+
secrets: inherit
45+
46+
action-tflint:
47+
permissions:
48+
contents: read
49+
uses: ./.github/workflows/e2e-action-tflint.yml
50+
with:
51+
mode: ${{ github.event_name == 'workflow_dispatch' && inputs.mode || 'ref' }}
52+
image_tag: ${{ github.event_name == 'workflow_dispatch' && inputs.image_tag || '' }}
53+
secrets: inherit
54+
55+
action-format-hcl:
56+
permissions:
57+
contents: read
58+
uses: ./.github/workflows/e2e-action-format-hcl.yml
59+
with:
60+
mode: ${{ github.event_name == 'workflow_dispatch' && inputs.mode || 'ref' }}
61+
image_tag: ${{ github.event_name == 'workflow_dispatch' && inputs.image_tag || '' }}
62+
secrets: inherit
63+
64+
action-terraform-validate:
65+
permissions:
66+
contents: read
67+
uses: ./.github/workflows/e2e-action-terraform-validate.yml
68+
with:
69+
mode: ${{ github.event_name == 'workflow_dispatch' && inputs.mode || 'ref' }}
70+
image_tag: ${{ github.event_name == 'workflow_dispatch' && inputs.image_tag || '' }}
71+
secrets: inherit
72+
73+
action-terraform-copy-vars:
74+
permissions:
75+
contents: read
76+
uses: ./.github/workflows/e2e-action-terraform-copy-vars.yml
77+
with:
78+
mode: ${{ github.event_name == 'workflow_dispatch' && inputs.mode || 'ref' }}
79+
image_tag: ${{ github.event_name == 'workflow_dispatch' && inputs.image_tag || '' }}
80+
secrets: inherit
81+
82+
action-container-structure-test:
83+
permissions:
84+
contents: read
85+
uses: ./.github/workflows/e2e-action-container-structure-test.yml
86+
with:
87+
mode: ${{ github.event_name == 'workflow_dispatch' && inputs.mode || 'ref' }}
88+
image_tag: ${{ github.event_name == 'workflow_dispatch' && inputs.image_tag || '' }}
89+
secrets: inherit
90+
91+
action-template-action:
92+
permissions:
93+
contents: read
94+
uses: ./.github/workflows/e2e-action-template-action.yml
95+
with:
96+
mode: ${{ github.event_name == 'workflow_dispatch' && inputs.mode || 'ref' }}
97+
image_tag: ${{ github.event_name == 'workflow_dispatch' && inputs.image_tag || '' }}
98+
secrets: inherit

0 commit comments

Comments
 (0)