From 6247362b6a1fe053650b191874f662b6bce19a75 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Mon, 21 Aug 2023 13:38:07 -0400 Subject: [PATCH] fix pip install in CI --- .github/workflows/ci.yml | 19 +++++++------------ pyproject.toml | 3 +++ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 621fca86..8f0d2e56 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,19 +11,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9] + python-version: ["3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Run Tests - run: | - pytest \ No newline at end of file + cache: 'pip' + cache-dependency-path: 'pyproject.toml' + - run: pip install ".[test]" + - run: pytest \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e4724eaa..cc53be97 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,9 @@ documentation = "https://pysiaf.readthedocs.io/en/latest/" repository = "https://github.com/spacetelescope/pysiaf" [project.optional-dependencies] +test = [ + 'pytest', +] docs = [ "stsci_rtd_theme", "sphinx_automodapi",