|
82 | 82 | run: | |
83 | 83 | pip install --upgrade pre-commit |
84 | 84 | python3 -m pre_commit run --show-diff-on-failure --color=always --all-files --verbose |
85 | | -
|
86 | | - - name: Run unit tests for scripts |
87 | | - run: | |
88 | | - pip install pytest pytest-xdist defusedxml |
89 | | - cd scripts |
90 | | - pytest -n 4 test_*.py |
91 | | -
|
92 | | - - name: Save pip cache |
93 | | - if: ${{ steps.pip-cache.outputs.status == 'miss' }} |
94 | | - uses: ./.github/actions/save |
95 | | - with: |
96 | | - path: ${{ steps.pip-cache.outputs.path }} |
97 | | - dest: ${{ steps.pip-cache.outputs.dest }} |
98 | | - |
99 | | - prepare: |
100 | | - name: Prepare |
101 | | - runs-on: Linux |
102 | | - |
103 | | - outputs: |
104 | | - matrix: ${{ steps.matrix.outputs.matrix }} |
105 | | - |
106 | | - steps: |
107 | | - - name: Inputs |
108 | | - run: | |
109 | | - cat <<EOF |
110 | | - ${{ toJSON(inputs) }} |
111 | | - EOF |
112 | | -
|
113 | | - - name: Matrix |
114 | | - id: matrix |
115 | | - run: | |
116 | | - if [[ -n "${{ inputs.runner_label }}" ]]; then |
117 | | - matrix='{"python": ["3.9"]}' |
118 | | - else |
119 | | - matrix='{"python": ["3.9"], "driver": ["rolling", "lts"]}' |
120 | | - fi |
121 | | - echo "matrix=$matrix" | tee -a $GITHUB_OUTPUT |
122 | | -
|
123 | | - integration-tests: |
124 | | - name: Integration tests matrix |
125 | | - needs: prepare |
126 | | - |
127 | | - strategy: |
128 | | - matrix: ${{ fromJson(needs.prepare.outputs.matrix) }} |
129 | | - |
130 | | - uses: ./.github/workflows/build-test-reusable.yml |
131 | | - with: |
132 | | - driver_version: ${{ matrix.driver }} |
133 | | - runner_label: ${{ inputs.runner_label }} |
134 | | - pytorch_ref: ${{ inputs.pytorch_ref }} |
135 | | - pytorch_mode: ${{ inputs.pytorch_mode || 'source' }} |
136 | | - python_version: ${{ matrix.python }} |
137 | | - upload_test_reports: ${{ inputs.upload_test_reports || false }} |
138 | | - ignore_errors: ${{ inputs.ignore_errors || false }} |
139 | | - skip_list: ${{ inputs.skip_list }} |
140 | | - run_name: ${{ inputs.run_name }} |
141 | | - enable_unskip: ${{ inputs.enable_unskip || false }} |
142 | | - use_pyenv_python: ${{ inputs.use_pyenv_python || false }} |
0 commit comments