diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2021-01-30 18:23:21 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2021-01-30 18:23:21 -0500 |
commit | 4d4d0c4a8225b68765043159043097dfabf642c0 (patch) | |
tree | 4a706337cb77717584f390752fd1e6870c103808 | |
parent | 9da7398193702615344a113d93dda1314db53eb1 (diff) | |
download | cmd2-git-4d4d0c4a8225b68765043159043097dfabf642c0.tar.gz |
Only run a single nox session for each version of Python in GitHub Actions matrix
Also:
- Temporarily disable dependency caching in GitHub Actions
- For Azure Pipelines MacOs testing, add Python 3.9 and remove 3.5
-rw-r--r-- | .github/workflows/ci.yml | 24 | ||||
-rw-r--r-- | azure-pipelines.yml | 6 | ||||
-rw-r--r-- | noxfile.py | 4 |
3 files changed, 15 insertions, 19 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ed536b1..04c82f41 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,24 +33,20 @@ jobs: uses: actions/setup-python@v2 # https://github.com/actions/setup-python with: python-version: ${{ matrix.python-version }} - - name: Cache dependencies - id: cache-deps - uses: actions/cache@v2 # https://github.com/actions/cache - with: - path: | - ${{ env.pythonLocation }}/bin/* - ${{ env.pythonLocation }}/lib/* - ${{ env.pythonLocation }}/scripts/* - key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py', 'requirements.txt') }} +# - name: Cache dependencies +# id: cache-deps +# uses: actions/cache@v2 # https://github.com/actions/cache +# with: +# path: ~/.cache/pip +# key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }} - name: Install python prerequisites - # Cache step doesnt seems to work right on windows, so install Python prerequisites on Windows regardless - if: matrix.os == 'windows-latest' || steps.cache-deps.outputs.cache-hit != 'true' - run: | - pip install -U --user pip setuptools setuptools-scm flake8 nox + # Only install dependencies when there is a cache miss +# if: steps.cache-deps.outputs.cache-hit != 'true' + run: pip install -U --user pip setuptools setuptools-scm flake8 nox - name: Lint if: matrix.os == 'ubuntu-latest' && matrix.python-version == env.PYTHON_LATEST run: flake8 . --count --ignore=E252,W503 --max-complexity=26 --max-line-length=127 --show-source --statistics ; - name: Run tests and post coverage results env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: python -m nox --non-interactive + run: python -m nox --non-interactive --session matrix.python-version diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5f58bc0d..8e5e170d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,9 +14,6 @@ jobs: # Run the pipeline with multiple Python versions strategy: matrix: - Python35: - python.version: '3.5' - NOXSESSION: 'tests-3.5' Python36: python.version: '3.6' NOXSESSION: 'tests-3.6' @@ -26,6 +23,9 @@ jobs: Python38: python.version: '3.8' NOXSESSION: 'tests-3.8' + Python39: + python.version: '3.9' + NOXSESSION: 'tests-3.9' # Increase the maxParallel value to simultaneously run the job for all versions in the matrix (max 10 for free open-source) maxParallel: 4 @@ -1,7 +1,7 @@ import nox -@nox.session(python=['3.7']) +@nox.session(python=['3.9']) def docs(session): session.install('sphinx', 'sphinx-rtd-theme', @@ -15,7 +15,7 @@ def docs(session): '-d', '{}/doctrees'.format(tmpdir), '.', '{}/html'.format(tmpdir)) -@nox.session(python=['3.5.2', '3.5.3', '3.5', '3.6', '3.7', '3.8', '3.9']) +@nox.session(python=['3.6', '3.7', '3.8', '3.9', '3.10-dev']) @nox.parametrize('plugin', [None, 'ext_test', 'template', |