-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Vu Anh
committed
Jun 9, 2024
1 parent
8fee5e9
commit e7021fe
Showing
4 changed files
with
57 additions
and
6 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,35 @@ | ||
on: | ||
pull_request: | ||
branches: [ main ] | ||
types: | ||
- labeled | ||
- synchronize | ||
|
||
jobs: | ||
ci-prompt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get PR Labels | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
PR_LABELS=$(gh pr view https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }} --json labels --jq '[.labels[].name]') | ||
echo "$PR_LABELS" | ||
echo "PR_LABELS=$PR_LABELS" >> $GITHUB_ENV | ||
- name: Checkout | ||
if: contains(env.PR_LABELS, 'ci-langdetect') | ||
uses: actions/checkout@v2 | ||
- name: Set up Python 3.7 | ||
if: contains(env.PR_LABELS, 'ci-langdetect') | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
if: contains(env.PR_LABELS, 'ci-langdetect') | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pytest tox | ||
- name: Run Test | ||
if: contains(env.PR_LABELS, 'ci-prompt') | ||
run: | | ||
tox -e langdetect |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,8 +43,8 @@ | |
'prompt': [ | ||
'openai' | ||
], | ||
'lang-detect': [ | ||
'fasttext ' | ||
'langdetect': [ | ||
'fasttext' | ||
] | ||
} | ||
setup( | ||
|
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