Skip to content

Commit 2b6dc4c

Browse files
author
Antoine THEBAUD
committed
Add login step in individual tests that require it
Signed-off-by: Antoine THEBAUD <[email protected]>
1 parent 6e9c322 commit 2b6dc4c

File tree

4 files changed

+21
-28
lines changed

4 files changed

+21
-28
lines changed

.github/workflows/test_apply_resources.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@ jobs:
2222
with:
2323
cli_version: "latest"
2424

25-
- name: Test apply resources
26-
uses: ./actions/apply_resources
25+
- name: Login to the API server
26+
uses: ./actions/login
2727
with:
2828
url: https://demo.perses.dev
29-
file: ./testdata/resources_folder/dashboard.json
3029
username: test
3130
password: test
3231

32+
- name: Test apply resources
33+
uses: ./actions/apply_resources
34+
with:
35+
file: ./testdata/resources_folder/dashboard.json
36+

.github/workflows/test_diff_dashboards.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ jobs:
2222
with:
2323
cli_version: "latest"
2424

25-
- name: Test dashboard diff
26-
uses: ./actions/diff_dashboards
25+
- name: Login to the API server
26+
uses: ./actions/login
2727
with:
2828
url: https://demo.perses.dev
29-
directory: ./testdata/resources_folder
3029
username: test
3130
password: test
3231

32+
- name: Test dashboard diff
33+
uses: ./actions/diff_dashboards
34+
with:
35+
directory: ./testdata/resources_folder

.github/workflows/test_preview_dashboards.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ jobs:
2222
with:
2323
cli_version: "latest"
2424

25-
- name: Test dashboard preview
26-
uses: ./actions/preview_dashboards
25+
- name: Login to the API server
26+
uses: ./actions/login
2727
with:
2828
url: https://demo.perses.dev
29-
file: ./testdata/resources_folder/dashboard.json
3029
username: test
3130
password: test
3231

32+
- name: Test dashboard preview
33+
uses: ./actions/preview_dashboards
34+
with:
35+
file: ./testdata/resources_folder/dashboard.json

.github/workflows/test_validate_resources.yaml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,12 @@ jobs:
2828
enable_go: true
2929
enable_cue: true
3030

31-
- name: Test resources validation with directory
31+
- name: Test resources validation
3232
uses: ./actions/validate_resources
3333
with:
3434
directory: ./testdata/resources_folder
3535

3636
- name: Test resources validation with file
3737
uses: ./actions/validate_resources
3838
with:
39-
file: ./testdata/resource.json
40-
41-
- name: Test resources validation with both inputs (should fail)
42-
id: test_fail
43-
uses: ./actions/validate_resources
44-
with:
45-
directory: ./testdata/resources_folder
46-
file: ./testdata/resource.json
47-
continue-on-error: true
48-
49-
- name: Validate failure for both inputs
50-
run: |
51-
if [ "${{ steps.test_fail.outcome }}" != "failure" ]; then
52-
echo "Error: Action did not fail as expected when both inputs were provided."
53-
exit 1
54-
else
55-
echo "Success: Action failed as expected."
56-
fi
39+
file: ./testdata/resource.json

0 commit comments

Comments
 (0)