-
Notifications
You must be signed in to change notification settings - Fork 5
138 lines (124 loc) · 4.96 KB
/
tests.yml
File metadata and controls
138 lines (124 loc) · 4.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Test Suite
on:
repository_dispatch:
jobs:
getCardIdAndBlock:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: get card id
id: getCardId
uses: ./extractCardId
with:
inputText: ${{ github.event.client_payload.extractCardId.title }}
- name: result
run: "echo cardId: ${{ steps.getCardId.outputs.cardId }}"
- name: block card
id: blockCard
if: ${{ steps.getCardId.outputs.cardId }}
uses: ./blockCard
with:
host: ${{ github.event.client_payload.common.host }}
apiToken: ${{ github.event.client_payload.common.apiToken }}
cardId: ${{ steps.getCardId.outputs.cardId }}
isBlocked: true
blockReason: Check the PR! Tests failed
createAndMove:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: create card
id: createCard
uses: ./createCard
with:
host: ${{ github.event.client_payload.common.host }}
apiToken: ${{ github.event.client_payload.common.apiToken }}
boardId: ${{ github.event.client_payload.createCard.boardId }}
title: ${{ github.event.client_payload.createCard.title }}
laneId: ${{ github.event.client_payload.createCard.laneId }}
typeId: ${{ github.event.client_payload.createCard.typeId }}
- name: move card
id: moveCard
uses: ./moveCard
with:
host: ${{ github.event.client_payload.common.host }}
apiToken: ${{ github.event.client_payload.common.apiToken }}
cardId: ${{ steps.createCard.outputs.createdCardId }}
laneId: ${{ github.event.client_payload.moveCard.laneId }}
- name: block card
id: blockCard
uses: ./blockCard
with:
host: ${{ github.event.client_payload.common.host }}
apiToken: ${{ github.event.client_payload.common.apiToken }}
cardId: ${{ steps.createCard.outputs.createdCardId }}
isBlocked: ${{ github.event.client_payload.blockCard.isBlocked }}
blockReason: ${{ github.event.client_payload.blockCard.blockReason }}
- name: add tag
id: addTag
uses: ./addTag
with:
host: ${{ github.event.client_payload.common.host }}
apiToken: ${{ github.event.client_payload.common.apiToken }}
cardId: ${{ steps.createCard.outputs.createdCardId }}
tag: ${{ github.event.client_payload.addTag.tag }}
validateCustomFields:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: validate
id: validate
uses: ./validateCustomFields
with:
host: ${{ github.event.client_payload.common.host }}
apiToken: ${{ github.event.client_payload.common.apiToken }}
cardId: ${{ github.event.client_payload.validateCustomFields.cardId }}
requiredCustomFields: ${{ github.event.client_payload.validateCustomFields.requiredCustomFields }}
- name: comment
id: comment
uses: ./addComment
with:
host: ${{ github.event.client_payload.common.host }}
apiToken: ${{ github.event.client_payload.common.apiToken }}
cardId: ${{ github.event.client_payload.common.cardId }}
comment: ${{ github.event.client_payload.addComment.comment }}
checkAndAddTag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: check if tag exists
id: hasTag
uses: ./hasTag
with:
host: ${{ github.event.client_payload.common.host }}
apiToken: ${{ github.event.client_payload.common.apiToken }}
cardId: ${{ github.event.client_payload.common.cardId }}
tag: ${{ github.event.client_payload.addTag.tag }}
- name: show current tags
run: "echo tags: ${{ steps.hasTag.outputs.tags }}"
- name: add tag if not exists
if: ${{ steps.hasTag.outputs.hasTag == 'false' }}
uses: ./addTag
with:
host: ${{ github.event.client_payload.common.host }}
apiToken: ${{ github.event.client_payload.common.apiToken }}
cardId: ${{ github.event.client_payload.common.cardId }}
tag: ${{ github.event.client_payload.addTag.tag }}
getCardDataAndTagType:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: get card data
id: getCardData
uses: ./getCardData
with:
host: ${{ github.event.client_payload.common.host }}
apiToken: ${{ github.event.client_payload.common.apiToken }}
cardId: ${{ github.event.client_payload.common.cardId }}
- name: add card type as tag
uses: ./addTag
with:
host: ${{ github.event.client_payload.common.host }}
apiToken: ${{ github.event.client_payload.common.apiToken }}
cardId: ${{ github.event.client_payload.common.cardId }}
tag: ${{ fromJson(steps.getCardData.outputs.cardData).type.title }}