-
Notifications
You must be signed in to change notification settings - Fork 15
69 lines (56 loc) · 1.97 KB
/
Copy pathmain.yml
File metadata and controls
69 lines (56 loc) · 1.97 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
name: Daily Provider Model Testing
on:
schedule:
- cron: '0 6 * * *' # Run daily at 6 AM UTC
workflow_dispatch: # Allow manual triggering
jobs:
test-providers:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
cache: 'pip'
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg flac
- name: Clear pip cache
run: pip cache purge
- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install g4f[all] aiohttp requests nodriver ffmpeg
- name: Monitor resources before testing
run: |
echo "Memory usage:"
free -m
echo "Disk usage:"
df -h
- name: Clean filesystem before work
run: |
# Remove old directories from filesystem only
rm -rf provider/ working/ output/ || true
- name: Run provider testing with embedded API
run: python provider_tester.py
- name: Clean git and commit new results
run: |
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
git config --local user.name "${{ github.actor }}"
# Remove old tracked files from git index
for dir in provider working output; do
git rm -r --ignore-unmatch "$dir" 2>/dev/null || true
done
# Add new files and commit
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Daily provider test results - $(date '+%Y-%m-%d')"
git push
else
echo "No changes to commit"
fi