-
Notifications
You must be signed in to change notification settings - Fork 56
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
Showing
13 changed files
with
198 additions
and
73 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,42 @@ | ||
name: Test When PR | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- swanlab/** | ||
- test/** | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' # 缓存 pip 依赖 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
pip install -r requirements.txt | ||
pip install -r requirements-media.txt | ||
pip install -r requirements-dev.txt | ||
- name: Test | ||
# 部分环境变量没有用到,不过后续可能会用到,所以先保留 | ||
run: | | ||
export SWANLAB_RUNTIME=test-no-cloud | ||
export SWANLAB_WEB_HOST=${{ secrets.SWANLAB_WEB_HOST }} | ||
export SWANLAB_API_HOST=${{ secrets.SWANLAB_API_HOST }} | ||
export SWANLAB_API_KEY=${{ secrets.SWANLAB_API_KEY }} | ||
export PYTHONPATH=$PYTHONPATH:. | ||
pytest test/unit |
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 |
---|---|---|
|
@@ -10,4 +10,5 @@ torchvision | |
python-dotenv | ||
freezegun | ||
build | ||
requests-mock | ||
responses | ||
requests-mock==1.12.1 # 不太好用,即将删除 |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
swankit==0.1.1b1 | ||
swanboard==0.1.3b5 | ||
cos-python-sdk-v5 | ||
urllib3 | ||
requests | ||
click | ||
pyyaml | ||
|
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
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
File renamed without changes.
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.