fix: lightning settings to public #70
Workflow file for this run
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
name: Test When PR | |
on: | |
pull_request: | |
paths: | |
- swanlab/** | |
- test/** | |
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 |