Skip to content

Commit

Permalink
added test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tmoroney committed Nov 24, 2024
1 parent 379ab5b commit ea02376
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 7 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/package-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Package Tauri App and Python Server for MacOS
on:
push:
branches:
- main
pull_request:
branches:
- main
- AutoSubsV1
# pull_request:
# branches:
# - main

jobs:
build:
Expand Down Expand Up @@ -67,7 +67,6 @@ jobs:
cd Mac-Server
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
pyinstaller transcription-server.spec --noconfirm
deactivate
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Package Tauri App and Python Server for MacOS
on:
push:
branches:
- main
# pull_request:
# branches:
# - main

jobs:
build:
runs-on: macos-14

steps:
- name: Checkout AutoSubs Repo Code
uses: actions/checkout@v4

- name: Package Python Server
run: |
cd Mac-Server
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pyinstaller transcription-server.spec --noconfirm
deactivate
- name: Get Latest Release Upload URL
id: get_upload_url
run: |
response=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/releases/latest)
echo "upload_url=$(echo $response | jq -r .upload_url | sed -e 's/{?name,label}//')" >> $GITHUB_ENV
- name: Upload to Latest Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ env.upload_url }}
asset_path: Mac-Server/Transcription-Server/transcription-server
asset_name: transcription-server
asset_content_type: application/octet-stream
4 changes: 2 additions & 2 deletions Mac-Server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
torch
torchaudio
torch=2.5.1
torchaudio=2.5.1
huggingface-hub
fastapi
uvicorn
Expand Down

0 comments on commit ea02376

Please sign in to comment.