-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (45 loc) · 1.2 KB
/
Copy pathtest.yml
File metadata and controls
56 lines (45 loc) · 1.2 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
# .github/workflows/test.yml
name: Run Tests
on:
workflow_dispatch:
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python
uses: actions/setup-python@v6.1.0
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
env:
SELLER_ID: ${{ secrets.SELLER_ID }}
API_KEY: ${{ secrets.API_KEY }}
run: |
python -m unittest tests/re_test.py
- name: Install build tools
run: |
python -m pip install build
- name: Build package
run: python -m build
- name: Verify Build Output
run: |
if [ -z "$(ls dist/*.whl 2>/dev/null)" ]; then
echo "Build failed: No .whl file found in dist directory."
exit 1
else
echo "Build successful: .whl file found."
fi