generated from deepgram/oss-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
22dc7d0
commit 10dd6bd
Showing
94 changed files
with
3,322 additions
and
974 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Test - Daily | ||
|
||
on: | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: | ||
- manual-daily-text | ||
schedule: | ||
- cron: "0 9 * * *" | ||
|
||
jobs: | ||
daily-tests: | ||
name: Daily Tests | ||
# Only run this job if we're in the main repo, not a fork. | ||
if: github.repository == 'deepgram/deepgram-python-sdk' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
timeout-minutes: 30 | ||
steps: | ||
|
||
- name: Checkout code by commit | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Config git | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
shell: bash | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --global init.defaultBranch main | ||
git config --global pull.rebase true | ||
git config --global url."https://git:[email protected]".insteadOf "https://github.com" | ||
- name: Get dependencies | ||
shell: bash | ||
run: | | ||
make ensure-deps | ||
- name: Install Dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
pip install -e . | ||
- name: Run all checks | ||
shell: bash | ||
env: | ||
DEEPGRAM_API_KEY: ${{ secrets.DEEPGRAM_API_KEY }} | ||
run: | | ||
make daily-test | ||
- name: Get dependencies | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
BRANCH_NAME="response-shape-${{ github.run_id }}" | ||
git checkout -b "$BRANCH_NAME" | ||
# create a PR | ||
git add ./tests/response_data | ||
git commit -s -m "auto-generated - update Response Shapes" | ||
git push origin "$BRANCH_NAME" | ||
gh pr create --title "auto-generated - update Response Shapes" --body "auto-generated - update Response Shapes" --base "main" --head "$BRANCH_NAME" | ||
sleep 10 | ||
gh pr merge "$BRANCH_NAME" --delete-branch --squash --admin |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Test - Unit | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- assigned | ||
- opened | ||
- synchronize | ||
- reopened | ||
jobs: | ||
build: | ||
name: Unit Tests | ||
# Only run this job if we're in the main repo, not a fork. | ||
if: github.repository == 'deepgram/deepgram-python-sdk' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
|
||
- name: Checkout code by commit | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install Dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
pip install -e . | ||
- name: Run all checks | ||
shell: bash | ||
env: | ||
DEEPGRAM_API_KEY: ${{ secrets.DEEPGRAM_API_KEY }} | ||
run: | | ||
make unit-test |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,8 @@ venv.bak/ | |
__pycache__ | ||
*.egg-info | ||
dist/ | ||
.mypy_cache/ | ||
.pytest_cache/ | ||
|
||
# build | ||
build/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.