Skip to content

Commit

Permalink
Create test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jalencato authored Sep 1, 2023
1 parent addaf0d commit b04f628
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/test.yml
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

0 comments on commit b04f628

Please sign in to comment.