diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0567ae3..85b345f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: max-parallel: 4 fail-fast: false matrix: - python-version: ["3.10", "3.11"] + python-version: ["3.11"] steps: - uses: actions/checkout@v3 @@ -24,15 +24,14 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + - name: Install SRT run: | python -m pip install --upgrade pip - pip install -r requirements.txt + pip install -e ".[test]" - name: Run tests env: SRT_PASSWORD: ${{ secrets.SRT_PASSWORD }} SRT_USERNAME: ${{ secrets.SRT_USERNAME }} run: | - pip install pytest - pytest SRT -x -v + pytest tests -x -v diff --git a/pyproject.toml b/pyproject.toml index e0bfa0f..21bae13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,13 @@ Changelog = "https://github.com/ryanking13/SRT/blob/master/CHANGELOG.md" [project.scripts] srt-reserve = "SRT.cli.reserve:main" +[project.optional-dependencies] +test = [ + "pytest", + "pytest-httpserver", +] + + [tool.hatch.version] source = "vcs" diff --git a/SRT/tests/__init__.py b/tests/__init__.py similarity index 100% rename from SRT/tests/__init__.py rename to tests/__init__.py diff --git a/SRT/tests/test_srt.py b/tests/test_srt.py similarity index 100% rename from SRT/tests/test_srt.py rename to tests/test_srt.py