From 5c548e5ca0033d0d7d35035c84bf253b44dd6767 Mon Sep 17 00:00:00 2001 From: AakashGC Date: Mon, 30 Oct 2023 11:59:31 +1100 Subject: [PATCH] updating test ci --- .github/workflows/tests.yml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e688993..3125313 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,30 +11,46 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: 3.11 - uses: pre-commit/action@v3.0.0 tests: - runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental || false }} strategy: + fail-fast: false matrix: - python-version: [3.9, "3.10"] + os: [ubuntu-latest] + python-version: ["3.9", "3.10", "3.11"] + # Only test the latest major release of Sphinx because otherwise we need to + # keep multiple versions of regression tests on file and this creates lots of + # noise in the tests. + sphinx: ["~=5.0","~=6.0","~=7.0"] + include: + - os: windows-latest + python-version: 3.x + # Windows pulling in dependencies fails + experimental: true + - os: macos-latest + python-version: 3.x + runs-on: ${{ matrix.os }} + steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} and Sphinx ${{ matrix.sphinx }} + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} cache: "pip" cache-dependency-path: "pyproject.toml" - - name: Install dependencies + - name: Install dependencies with Sphinx ${{ matrix.sphinx }} run: | python -m pip install --upgrade pip - python -m pip install -e .[test] + python -m pip install --upgrade "sphinx${{matrix.sphinx}}" -e .[test] --pre + - name: Run pytest run: > pytest --durations=10 --cov=quantecon_book_theme --cov-report=xml --cov-report=term-missing