-
Notifications
You must be signed in to change notification settings - Fork 30
110 lines (92 loc) · 3.75 KB
/
Copy pathpython-package.yml
File metadata and controls
110 lines (92 loc) · 3.75 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Test behavex across python and behave versions
on: [push, pull_request]
permissions:
contents: read
jobs:
test-behavex:
runs-on: ${{ matrix.os }}
env:
PYTHONIOENCODING: utf-8
PYTHONLEGACYWINDOWSSTDIO: utf-8
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
behave-version: ['1.2.6', '1.3.0', '1.3.1', '1.3.3', 'latest']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install setuptools
run: |
python -m pip install 'setuptools>=61'
- name: Install behavex with behave ${{ matrix.behave-version }}
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install build
python -m build
python -m pip install beautifulsoup4
if [ "${{ matrix.behave-version }}" == "latest" ]; then
python -m pip install behave jinja2 configobj minify-html csscompressor allure-python-commons
else
python -m pip install behave==${{ matrix.behave-version }} jinja2 configobj minify-html csscompressor allure-python-commons
fi
python -m pip install dist/behavex-*.tar.gz --no-deps
python -m pip install behavex-images==3.3.1
pip freeze
echo "Installed behave version:"
python -c "import behave; print(f'behave {behave.__version__}')"
- name: Verify behavex command
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
dir
behavex .\\tests\\features\\*.feature
else
ls -la tests/features/
behavex tests/features/*.feature
fi
# Set report.json to be available as an artifact for debugging
- name: Set report.json to be available as an artifact
uses: actions/upload-artifact@v4
with:
name: report-${{ matrix.os }}-py${{ matrix.python-version }}-behave${{ matrix.behave-version }}
path: ${{ github.workspace }}/output/report.json
# Test behavex without setuptools
test-without-setuptools:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12', '3.13']
behave-version: ['1.2.6', '1.3.0', '1.3.1', '1.3.3', 'latest']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install behavex without setuptools with behave ${{ matrix.behave-version }}
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install build
python -m pip install beautifulsoup4
if [ "${{ matrix.behave-version }}" == "latest" ]; then
python -m pip install behave jinja2 configobj minify-html csscompressor allure-python-commons
else
python -m pip install behave==${{ matrix.behave-version }} jinja2 configobj minify-html csscompressor allure-python-commons
fi
python -m pip install behavex-images==3.3.1
python -m build
python -m pip install dist/behavex-*.tar.gz --no-deps
echo "Installed behave version:"
python -c "import behave; print(f'behave {behave.__version__}')"
- name: Run behavex tests with image attachments and behave ${{ matrix.behave-version }}
run: |
behavex ./tests/features/image_attachments.feature