forked from awslabs/graphstorm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Graphstorm CI | ||
# Test execution order - [lint] -> [pytest] -> [end2end_cpu, end2end, end2end_mgpu] | ||
name: continuous-integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- ci_dev | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
|
||
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-PYTEST: chmod +x ./pytest_check.sh && ./pytest_check.sh | ||
COMMAND-LINT: chmod +x ./lint_check.sh && ./lint_check.sh | ||
COMMAND-E2E-CPU-TEST: chmod +x ./e2e_cpu_check.sh && ./e2e_cpu_check.sh | ||
COMMAND-E2E: chmod +x ./e2e_check.sh && ./e2e_check.sh | ||
COMMAND-E2E-MGPU: chmod +x ./e2e_mgpu_check.sh && ./e2e_mgpu_check.sh | ||
|
||
jobs: | ||
|
||
lint_check: | ||
if: ${{ github.event.label.name != 'draft' }} | ||
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 | ||
shell: bash | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install pytest | ||
pip3 install boto3 | ||
- name: Submit Job (for Push) | ||
if: ${{ github.event_name == 'push' }} | ||
shell: bash | ||
run: | | ||
echo "Start submitting job - Push" | ||
python3 ./submitJob.py --job-type CI-LINT-PUSH --name Graphstorm-LintTest-Push-'${{ github.ref }}' \ | ||
--command "${{ env.COMMAND-LINT }}" \ | ||
--remote https://github.com/'${{ github.repository }}' \ | ||
--source-ref '${{ github.ref }}' \ | ||
--wait | ||
- name: Submit Job (for Pull Request) | ||
if: ${{ github.event_name == 'pull_request' }} | ||
shell: bash | ||
run: | | ||
echo "Start submitting job - Pull Request" | ||
python3 ./submitJob.py --job-type CI-LINT-PUSH --name Graphstorm-LintTest-PR#-'${{ github.event.number }}' \ | ||
--command "${{ env.COMMAND-LINT }}" \ | ||
--remote https://github.com/'${{ github.event.pull_request.head.repo.full_name }}' \ | ||
--source-ref '${{ github.event.pull_request.head.sha }}' \ | ||
--wait | ||