-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
49 lines (44 loc) · 1.39 KB
/
action.yml
File metadata and controls
49 lines (44 loc) · 1.39 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
name: "Build and Test Python Code" # Name for marketplace/workflow
description: "Used to run the build and testing of python code"
inputs:
python-version:
description: "The version of Python to use"
required: true
output-path:
description: "The output path for the published application"
required: true
outputs:
artifact-path:
description: "The path to the build artifact"
runs:
using: "composite"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }} # .x is semantic version syntax to get the latest minor release.
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
shell: bash
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-md pytest-emoji
shell: bash
- name: Run pytest
uses: pavelzw/pytest-action@v2
with:
verbose: true
emoji: true
job-summary: true
click-to-expand: true
report-title: 'Test Report'
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: pythonproject-build
path: ${{ inputs.output-path }}/**
if-no-files-found: error