forked from flagos-ai/TransformerEngine-FL
-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (71 loc) · 2.13 KB
/
Copy pathintegration_tests_common.yml
File metadata and controls
77 lines (71 loc) · 2.13 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
name: Common Integration Tests
on:
workflow_call:
inputs:
device:
required: true
type: string
image:
required: true
type: string
container_pull_policy:
required: false
type: string
default: never
runs_on:
required: true
type: string
container_volumes:
required: true
type: string
container_options:
required: true
type: string
setup_script:
required: false
type: string
default: ''
checkout_submodules:
required: false
type: string
default: 'false'
test_matrix:
required: true
type: string
jobs:
integration_test:
defaults:
run:
shell: bash
runs-on: ${{ fromJson(inputs.runs_on) }}
strategy:
fail-fast: false
matrix:
test_group: ${{ fromJson(inputs.test_matrix) }}
name: integration-${{ inputs.device }}-${{ matrix.test_group.name }}
container:
image: ${{ inputs.image }}
volumes: ${{ fromJson(inputs.container_volumes) }}
options: --pull ${{ inputs.container_pull_policy }} ${{ inputs.container_options }}
steps:
- name: Prepare Checkout Environment
run: |
/usr/bin/git config --global safe.directory '*'
/usr/bin/git config --global --unset-all credential.helper 2>/dev/null || true
/usr/bin/git config --system --unset-all credential.helper 2>/dev/null || true
- name: Checkout Source Code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: ${{ inputs.checkout_submodules }}
set-safe-directory: true
- name: Environment Setup
if: inputs.setup_script != ''
run: bash "$GITHUB_WORKSPACE/${{ inputs.setup_script }}"
- name: Execute Tests
run: |
set -euo pipefail
export TE_LIB_PATH="${TE_LIB_PATH:-$(python3 -c 'import site; print(site.getsitepackages()[0])')/transformer_engine}"
test -f "${{ matrix.test_group.path }}"
bash "${{ matrix.test_group.path }}"
timeout-minutes: 30