-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 2.05 KB
/
pr-build-python.yml
File metadata and controls
66 lines (56 loc) · 2.05 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: PR Build Python
on: workflow_dispatch
# pull_request:
# branches:
# - main
#workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.x" # .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)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-md pytest-emoji
- 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: src/**
if-no-files-found: error
# # create a test summary markdown file
# # if you don't specify an output file, it will automatically add
# # as a job summary. If you specify an output file, you have to
# # create your own step of adding it to the job summary. I am
# # intentionally doing that to show job summaries
# # - name: Create test summary
# # uses: test-summary/action@v2.4
# # with:
# # paths: ${{ github.workspace }}/results/*.xml
# # output: ${{ github.workspace }}/results/summary.md
# # show: "all"
# # if: always()
# # # I am adding the test results to the Job Summary
# # - name: Add Test Results To Job Summary
# # run: |
# # echo "TEST RESULTS:" >> $GITHUB_STEP_SUMMARY
# # echo "" >> $GITHUB_STEP_SUMMARY # this is a blank line
# # cat "${{ github.workspace }}/results/summary.md" >> $GITHUB_STEP_SUMMARY
# # if: always()