-
Notifications
You must be signed in to change notification settings - Fork 11
50 lines (42 loc) · 1.3 KB
/
test.yml
File metadata and controls
50 lines (42 loc) · 1.3 KB
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
name: "Test"
on:
workflow_call:
inputs:
name:
required: true
type: string
path:
required: true
type: string
jobs:
unit_tests:
name: ${{ inputs.name }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
- name: Setup Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
with:
python-version: '3.11'
- name: Install pipenv
run: python3 -m pip install pipenv
- name: Install Dependencies
working-directory: ${{ inputs.path }}
run: pipenv install --dev
- name: Execute Unit Tests
working-directory: ${{ inputs.path }}
run: pipenv run unittests-cov
- name: Upload Test Reports
if: always()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
with:
name: Test-Reports-${{ inputs.name }}
path: ${{ inputs.path }}/test-reports/**
- name: Publish Test Report
uses: dorny/test-reporter@fe45e9537387dac839af0d33ba56eed8e24189e8
if: always()
with:
name: ${{ inputs.name }} Unit Tests
path: ${{ inputs.path }}/test-reports/*.xml
reporter: java-junit