Skip to content

Commit 84060e4

Browse files
committed
feat: update
1 parent 370ae6b commit 84060e4

File tree

3 files changed

+69
-20
lines changed

3 files changed

+69
-20
lines changed

.circleci/test-deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
workflows:
2121
test-a:
2222
jobs:
23-
- sleep:
24-
time: 5
23+
- workflow-queue/pipeline-queue
2524
test-b:
2625
jobs:
2726
- sleep:
28-
time: 10
27+
time: 5
2928
test-c:
3029
jobs:
31-
- workflow-queue/pipeline-queue
30+
- sleep:
31+
time: 10
3232

3333
test-global-queue:
3434
jobs:

src/test/fixture.json

Lines changed: 60 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,71 @@
22
"next_page_token": null,
33
"items": [
44
{
5-
"pipeline_id": "29422b30-ac5f-4232-b543-d1e6319310e1",
6-
"id": "62badd1b-ed00-49fe-89bd-d6c0e452a426",
7-
"name": "build",
5+
"pipeline_id": "fb96f614-b767-4d39-b8f6-0fb25cb3d9d2",
6+
"id": "86b744ae-39a5-42a1-aba8-1a9fba4fb4c2",
7+
"name": "test-deploy",
88
"project_slug": "gh/promiseofcake/circleci-workflow-queue",
9-
"status": "running",
10-
"started_by": "0989fcb2-c8d2-43ed-bfdd-3ff63487e121",
11-
"pipeline_number": 60988,
12-
"created_at": "2024-04-12T22:58:31Z",
13-
"stopped_at": null
9+
"status": "success",
10+
"started_by": "df121a07-9607-43e1-8d85-b100e1a6c0a2",
11+
"pipeline_number": 145,
12+
"created_at": "2024-04-14T00:22:05Z",
13+
"stopped_at": "2024-04-14T00:22:12Z"
1414
},
1515
{
16-
"pipeline_id": "29422b30-ac5f-4232-b543-d1e6319310e1",
17-
"id": "43c70590-ceb7-472d-9169-5f5061c9e625",
18-
"name": "setup",
16+
"pipeline_id": "fb96f614-b767-4d39-b8f6-0fb25cb3d9d2",
17+
"id": "1c2aa9fd-194f-423b-bc2c-c95c091f54bb",
18+
"name": "test-global-queue",
19+
"project_slug": "gh/promiseofcake/circleci-workflow-queue",
20+
"status": "success",
21+
"started_by": "df121a07-9607-43e1-8d85-b100e1a6c0a2",
22+
"pipeline_number": 145,
23+
"created_at": "2024-04-14T00:22:05Z",
24+
"stopped_at": "2024-04-14T00:22:24Z"
25+
},
26+
{
27+
"pipeline_id": "fb96f614-b767-4d39-b8f6-0fb25cb3d9d2",
28+
"id": "37113ae1-cf62-45aa-9fe4-b36b70d7049c",
29+
"name": "test-c",
30+
"project_slug": "gh/promiseofcake/circleci-workflow-queue",
31+
"status": "success",
32+
"started_by": "df121a07-9607-43e1-8d85-b100e1a6c0a2",
33+
"pipeline_number": 145,
34+
"created_at": "2024-04-14T00:22:05Z",
35+
"stopped_at": "2024-04-14T00:22:45Z"
36+
},
37+
{
38+
"pipeline_id": "fb96f614-b767-4d39-b8f6-0fb25cb3d9d2",
39+
"id": "bc2825b3-7e4b-4c61-b0e4-d5458993e11f",
40+
"name": "test-b",
41+
"project_slug": "gh/promiseofcake/circleci-workflow-queue",
42+
"status": "success",
43+
"started_by": "df121a07-9607-43e1-8d85-b100e1a6c0a2",
44+
"pipeline_number": 145,
45+
"created_at": "2024-04-14T00:22:05Z",
46+
"stopped_at": "2024-04-14T00:22:30Z"
47+
},
48+
{
49+
"pipeline_id": "fb96f614-b767-4d39-b8f6-0fb25cb3d9d2",
50+
"id": "66c6a987-f59f-4e0e-8086-c6c690b436e9",
51+
"name": "test-a",
52+
"project_slug": "gh/promiseofcake/circleci-workflow-queue",
53+
"status": "success",
54+
"started_by": "df121a07-9607-43e1-8d85-b100e1a6c0a2",
55+
"pipeline_number": 145,
56+
"created_at": "2024-04-14T00:22:05Z",
57+
"stopped_at": "2024-04-14T00:22:26Z"
58+
},
59+
{
60+
"pipeline_id": "fb96f614-b767-4d39-b8f6-0fb25cb3d9d2",
61+
"id": "ffed5cdc-7b28-4407-ab06-fb4b0b6f5c40",
62+
"name": "lint-pack",
1963
"project_slug": "gh/promiseofcake/circleci-workflow-queue",
2064
"tag": "setup",
21-
"status": "running",
22-
"started_by": "0989fcb2-c8d2-43ed-bfdd-3ff63487e121",
23-
"pipeline_number": 60988,
24-
"created_at": "2024-04-12T22:58:14Z",
25-
"stopped_at": "2024-04-12T22:58:28Z"
65+
"status": "success",
66+
"started_by": "df121a07-9607-43e1-8d85-b100e1a6c0a2",
67+
"pipeline_number": 145,
68+
"created_at": "2024-04-14T00:21:24Z",
69+
"stopped_at": "2024-04-14T00:22:05Z"
2670
}
2771
]
2872
}

src/test/validate.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
# query the pipeline_id to get the list of workflow status
4+
# run jq '.items | sort_by(.stopped_at) | .[].name' fixture.json
5+
# ensure the order is as we expect

0 commit comments

Comments
 (0)