-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (64 loc) · 2.1 KB
/
bk_asw_batch_ci.yml
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
name: continuous_integration
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.event.pull_request.head.sha }}
cancel-in-progress: true
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: bash ./pytest_check.sh
jobs:
pytest_check:
if: ${{ github.event.label.name != 'draft' }}
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::801250864718:role/github-oidc-role
aws-region: us-west-2
- 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
id: submit-job
shell: bash
run: |
echo "Start submitting job - Check"
python3 ./submitJob.py --job-type CI-CPU --name hello_DGL-pytest-check-'${{ github.ref }}' \
--command "${{ env.COMMAND-PYTEST }}" \
--remote https://github.com/'${{ github.repository }}' \
--source-ref '${{ github.ref }}'
- name: Check batch job status periodically
id: check-job-status
shell: bash
run: |
echo "Start checking job status - Check"
python3 ./checkJobStatus.py --job-id ${{ steps.submit-job.outputs }} \
--job-name hello_DGL-pytest-check-'${{ github.ref }}'
schedule: # execute every 2 minutes
- cron: '*/2 * * * *'
- name: Exit if job status finished
shell: bash
run: |
echo "Start exiting job - Check"
python3 ./exitJob.py --job-id ${{ steps.submit-job.outputs }}