forked from EpicGamesExt/BlenderTools
-
-
Notifications
You must be signed in to change notification settings - Fork 18
76 lines (65 loc) · 2.03 KB
/
re-use-tests.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
72
73
74
75
76
name: re-use-tests
on:
workflow_call:
inputs:
title:
required: true
type: string
blender-version:
required: true
type: string
unreal-version:
required: true
type: string
secrets:
GH_USER:
required: true
GH_PAT:
required: true
jobs:
tests:
name: ${{ inputs.title }}
runs-on: poly-hammer-runner
timeout-minutes: 120
permissions:
contents: read
checks: write
id-token: write
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Python Dependencies
shell: bash
run: |
python -m venv .venv
source .venv/bin/activate
pip install --upgrade -r requirements.txt
- name: Run All Tests
shell: bash
run: |
source .venv/bin/activate
export GITHUB_TOKEN=${{ secrets.GH_PAT }}
export DOCKER_ENVIRONMENT=yes
export UNREAL_VERSION=${{ inputs.unreal-version }}
export BLENDER_VERSION=${{ inputs.blender-version }}
echo $GITHUB_TOKEN | docker login ghcr.io -u ${{ secrets.GH_USER }} --password-stdin
docker pull ghcr.io/poly-hammer/blender-linux:$BLENDER_VERSION
docker pull ghcr.io/poly-hammer/unreal-linux:$UNREAL_VERSION
cd ./tests
python run_tests.py
- name: Publish ${{ inputs.title }} Report
uses: mikepenz/action-junit-report@v4
# always run even if the previous step fails
if: success() || failure()
with:
check_name: ${{ inputs.title }} Results (Unreal ${{ inputs.unreal-version }} Blender ${{ inputs.blender-version }})
include_passed: True
fail_on_failure: True
require_tests: True
require_passed_tests: True
detailed_summary: True
report_paths: './tests/results/*.xml'