Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f855e5f

Browse files
Added run-sample-tests action
1 parent 70cc103 commit f855e5f

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,17 @@ Example:
171171
with:
172172
mode: d3d11_sw
173173
```
174+
175+
## run-sample-tests
176+
177+
Runs sample and tutorial tests for the current configuration.
178+
179+
Example:
180+
181+
```yml
182+
- name: Sample Tests D3D11
183+
uses: DiligentGraphics/github-action/run-sample-tests@v1
184+
with:
185+
args: "--mode d3d11 --adapter sw"
186+
golden-image-mode: "compare_update"
187+
```

run-sample-tests/action.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "DiligentGraphics: Run Sample Tests"
2+
description: "Run sample and tutorial tests"
3+
4+
inputs:
5+
args:
6+
description: 'test arguments (e.g. "--mode d3d11 --adapter sw")'
7+
required: true
8+
9+
golden-image-mode:
10+
description: 'Golden image processing mode: "compare" (default), "capture", or "compare_update"'
11+
required: false
12+
default: 'compare'
13+
14+
runs:
15+
using: "composite" # must be set to "composite"
16+
17+
steps:
18+
- name: Windows Tests
19+
if: ${{ runner.os == 'Windows' }}
20+
working-directory: ${{github.workspace}}/DiligentSamples/Tests
21+
shell: cmd
22+
run: |
23+
:: Sample Tests
24+
ProcessGoldenImages.bat "${{github.workspace}}/DiligentTestData/GoldenImages" ${{inputs.golden-image-mode}} "${{inputs.args}}"
25+
26+
- name: Linux Tests
27+
if: ${{ runner.os == 'Linux' }}
28+
working-directory: ${{github.workspace}}/DiligentSamples/Tests
29+
shell: bash
30+
run: |
31+
# Sample Tests
32+
chmod +x ./ProcessGoldenImages.sh
33+
./ProcessGoldenImages.sh "${{github.workspace}}/DiligentTestData/GoldenImages" ${{inputs.golden-image-mode}} "${{inputs.args}}"

0 commit comments

Comments
 (0)