Skip to content

test

test #2

name: Test on Linux

Check failure on line 1 in .github/workflows/test-variant-dependency-test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test-variant-dependency-test.yml

Invalid workflow file

(Line: 33, Col: 7): Unexpected value 'build-result', (Line: 34, Col: 7): Unexpected value 'test-result', (Line: 41, Col: 14): Unrecognized named-value: 'build-result'. Located at position 1 within expression: build-result
on:
workflow_call:
inputs:
filter-cuda:
description: "Filter CUDA version"
default: ""
type: string
filter-python:
description: "Filter Python version"
default: ""
type: string
build-matrix:
description: "Build matrix to utilize"
default: ""
type: string
build-result:
description: "Build result"
default: ""
type: string
test-result:
description: "Test result"
default: ""
type: string
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJSON(inputs.build-matrix) }}
build-result: ${{ inputs.build-result }}
test-result: ${{ inputs.test-result }}
name: test-${{ matrix.cuda-version }}
outputs:
result: ${{ steps.test-step.outputs.result }}
steps:
- name: Check build result
id: check-build-result
run: |
set -euo pipefail
echo "Build result: ${{ inputs.build-result }}"
echo "Build matrix: ${{ build-result }}"
if [ "${{ inputs.build-result }}" == "success" ]; then
echo "Build result is success"
else
echo "Build result is failure"
exit 1
fi
- name: Check previous test result
id: check-previous-test-result
run: |
set -euo pipefail
if [ "${{ inputs.test-result }}" == "success" || "${{ inputs.test-result }}" == "" ]; then
echo "Test result is success"
else
echo "Test result is failure"
exit 1
fi
- name: Test with CUDA ${{ matrix.cuda-version }}
id: test-step
run: |
set -euo pipefail
echo "Testing with CUDA ${{ matrix.cuda-version }}"
if [ "${{ matrix.cuda-version }}" == "12.8" ]; then
echo "Testing with CUDA 12.8 is not supported"
echo "result=failure" >> $GITHUB_OUTPUT
exit 1
fi
echo "Testing with CUDA ${{ matrix.cuda-version }} successfully completed"
echo "result=success" >> $GITHUB_OUTPUT