-
Notifications
You must be signed in to change notification settings - Fork 75
157 lines (138 loc) · 6.21 KB
/
Copy pathgsprocessing-workflow.yml
File metadata and controls
157 lines (138 loc) · 6.21 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# Graphstorm CI for GSProcessing Only
# Test execution order - [lint] -> [gsprocessing-pytest]
name: gsprocessing_workflow
on:
push:
branches:
- main
- ci_dev
paths:
- '.github/workflow_scripts/gsprocessing_pytest.sh'
- '.github/workflow_scripts/gsprocessing_lint.sh'
- 'graphstorm-processing/**'
- '.github/workflows/gsprocessing-workflow.yml'
pull_request_target:
types: [ labeled ]
paths:
- '.github/workflow_scripts/gsprocessing_pytest.sh'
- '.github/workflow_scripts/gsprocessing_lint.sh'
- 'graphstorm-processing/**'
- '.github/workflows/gsprocessing-workflow.yml'
permissions:
id-token: write
pull-requests: write
contents: read
defaults:
run:
shell: bash
# All test scripts split in individual .sh files and moved to .github/workflow_scripts
env:
COMMAND-LINT: bash gsprocessing_lint.sh
COMMAND-GSProcessing-Pytest: bash gsprocessing_pytest.sh
jobs:
# ─────────────────────────────────────────────────────────────────────────────
# GSP LINT
# ─────────────────────────────────────────────────────────────────────────────
gsp_lint:
if: ${{ github.event_name == 'push' ||
(github.event.label.name != 'draft'
&& github.event_name == 'pull_request_target'
&& contains(github.event.pull_request.labels.*.name, 'ready')) }}
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::698571788627:role/github-oidc-role
aws-region: us-east-1
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install boto3
- name: Submit Job (for Push)
if: ${{ github.event_name == 'push' }}
env:
GIT_REF: ${{ github.ref }}
LINT_COMMAND: ${{ env.COMMAND-LINT }}
REPO_NAME: ${{ github.repository }}
run: |
echo "Start submitting job - Push"
python3 ./submitJob.py --job-type CI-LINT-PUSH \
--name "Graphstorm-LintTest-Push-${GIT_REF}" \
--command "${LINT_COMMAND}" \
--remote "https://github.com/${REPO_NAME}" \
--source-ref "${GIT_REF}" \
--wait
- name: Submit Job (for Pull Request)
if: ${{ github.event_name == 'pull_request_target' }}
env:
PR_NUMBER: ${{ github.event.number }}
LINT_COMMAND: ${{ env.COMMAND-LINT }}
PR_REPO: ${{ github.event.pull_request.head.repo.full_name }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
run: |
echo "Start submitting job - Pull Request"
python3 ./submitJob.py --job-type CI-LINT \
--name "Graphstorm-LintTest-PR#-${PR_NUMBER}" \
--command "${LINT_COMMAND}" \
--remote "https://github.com/${PR_REPO}" \
--source-ref "${PR_SHA}" \
--wait
# ─────────────────────────────────────────────────────────────────────────────
# GSPROCESSING PYTEST
# ─────────────────────────────────────────────────────────────────────────────
gsprocessing:
if: ${{ github.event.label.name != 'draft' }}
needs: gsp_lint
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::698571788627:role/github-oidc-role
aws-region: us-east-1
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install boto3
- name: Submit Job (for Push)
if: ${{ github.event_name == 'push' }}
env:
GIT_REF: ${{ github.ref }}
GSP_COMMAND: ${{ env.COMMAND-GSProcessing-Pytest }}
REPO_NAME: ${{ github.repository }}
run: |
echo "Start submitting job - Push"
python3 ./submitJob.py --job-type CI-GSProcessing-CHECK \
--name "Graphstorm-GSProcessing-Push-${GIT_REF}" \
--command "${GSP_COMMAND}" \
--remote "https://github.com/${REPO_NAME}" \
--source-ref "${GIT_REF}" \
--wait
- name: Submit Job (for Pull Request)
if: ${{ github.event_name == 'pull_request_target' }}
env:
PR_NUMBER: ${{ github.event.number }}
GSP_COMMAND: ${{ env.COMMAND-GSProcessing-Pytest }}
PR_REPO: ${{ github.event.pull_request.head.repo.full_name }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
run: |
echo "Start submitting job - Pull Request"
python3 ./submitJob.py --job-type CI-GSProcessing-CHECK \
--name "Graphstorm-GSProcessing-PR#-${PR_NUMBER}" \
--command "${GSP_COMMAND}" \
--remote "https://github.com/${PR_REPO}" \
--source-ref "${PR_SHA}" \
--wait