-
Notifications
You must be signed in to change notification settings - Fork 36
56 lines (53 loc) · 2.04 KB
/
get_and_run_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
name: Prepare and Run Tests
on:
workflow_call:
inputs:
directories:
required: true
type: string
exclude-dirs:
required: false
type: string
default: ''
run_experimental:
required: false
type: boolean
default: false
fuzz:
required: false
type: boolean
default: false
jobs:
prepare-test-environment:
name: 'Prepare Test Environment'
runs-on: ubuntu-latest
outputs:
test-infos: ${{ steps.get-test-infos.outputs.test-infos }}
include_npm: ${{ steps.set-include-npm.outputs.include_npm }}
steps:
- uses: actions/checkout@v4
- id: get-test-infos
uses: ./.github/actions/get_test_infos
with:
directories: ${{ inputs.directories }}
exclude-dirs: ${{ inputs.exclude-dirs }}
- uses: ./.github/actions/set_run_conditions
id: set-conditions
- id: set-include-npm
run: |
if [[ "${{ steps.set-conditions.outputs.is_main_branch_push }}" == "true" || \
"${{ steps.set-conditions.outputs.is_main_branch_push_from_release_merge }}" == "true" || \
"${{ steps.set-conditions.outputs.is_release_branch_pr }}" == "true" ]]; then
echo "include_npm=true" >> $GITHUB_OUTPUT
else
echo "include_npm=false" >> $GITHUB_OUTPUT
fi
run-tests:
name: 'Run'
needs: prepare-test-environment
uses: ./.github/workflows/run_test.yml
with:
test_infos: ${{ needs.prepare-test-environment.outputs.test-infos }}
include_npm: ${{ needs.prepare-test-environment.outputs.include_npm == 'true' }}
run_experimental: ${{ inputs.run_experimental }}
fuzz: ${{ inputs.fuzz }}