From 464f0d206ce76a14244609a0792c6690cccc6cfd Mon Sep 17 00:00:00 2001 From: 2061360308 <2061360308@qq.com> Date: Thu, 14 Dec 2023 18:16:20 +0800 Subject: [PATCH] chore:update workflow --- .github/workflows/pytest.yml | 2 ++ api_test.py | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 35223ee..f74121f 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -23,5 +23,7 @@ jobs: pip install pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Run tests with pytest + env: + COOKIE: ${{ secrets.COOKIE }} run: | pytest \ No newline at end of file diff --git a/api_test.py b/api_test.py index fc1e7ee..fd266dd 100644 --- a/api_test.py +++ b/api_test.py @@ -2,9 +2,7 @@ from pytest_html import extras import json import os from pprint import pprint -import dotenv from package.NeteaseCloudMusic import NeteaseCloudMusicApi, api_help, api_list -dotenv.load_dotenv() # 从.env文件中加载环境变量 netease_cloud_music_api = NeteaseCloudMusicApi() # 初始化API netease_cloud_music_api.cookie = os.getenv('COOKIE') # 设置cookie netease_cloud_music_api.DEBUG = True # 开启调试模式