diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index afa807492..3a50cd2f3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,18 +15,17 @@ jobs: # won't be valid. But to avoid confusion, we explicitly restrict the scope. # See https://github.com/popsim-consortium/stdpopsim/issues/662 if: github.repository == 'popsim-consortium/stdpopsim' - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.10 - name: Install deps run: | python -m pip install wheel - python -m pip install numpy==1.19.2 # for scikit-allel python -m pip install -r requirements/CI/requirements.txt # Install the local package so that stdpopsim is in the path, # which is needed for generating docs `command-output`. @@ -37,7 +36,7 @@ jobs: - name: Checkout docs site if: (!github.event.pull_request) - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: popsim-consortium/stdpopsim-docs token: ${{ secrets.POPSIMBOT_STDPOPSIM_DOCS_TOKEN }} diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 75edae2bf..d14838a00 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -8,10 +8,10 @@ on: jobs: pre-commit: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v5 with: - python-version: 3.8 - - uses: pre-commit/action@v2.0.0 + python-version: 3.12 + - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 366fc7663..8a80c8992 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,38 +17,32 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, macos-12, windows-latest] - python: ["3.8", "3.10"] + os: [ubuntu-latest, macos-latest, windows-latest] + python: ["3.9", "3.10"] env: CONDA_ENV_NAME: stdpopsim OS: ${{ matrix.os }} PYTHON: ${{ matrix.python }} steps: - name: cancel previous runs - uses: styfle/cancel-workflow-action@0.6.0 + uses: styfle/cancel-workflow-action@0.12.1 with: access_token: ${{ github.token }} - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: find conda id: find-conda run: | echo "CONDA=$CONDA" >> $GITHUB_OUTPUT - - name: fix conda permissions - if: runner.os == 'macOS' - run: | - # Fix incorrect conda permissions on mac that prevent cache restore. - sudo chown -R $USER:staff ${{ steps.find-conda.outputs.CONDA }} - - name: cache conda id: cache - uses: actions/cache@v3 + uses: actions/cache@v4 env: # Increase this to reset the cache if the key hasn't changed. - CACHE_NUM: 9 + CACHE_NUM: 11 with: path: | ${{ steps.find-conda.outputs.CONDA }}/envs/${{ env.CONDA_ENV_NAME }} @@ -56,7 +50,7 @@ jobs: key: ${{ runner.os }}-${{ matrix.python }}-conda-${{ hashFiles('requirements/CI/*') }}-${{ env.CACHE_NUM }} - name: install conda - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 if: steps.cache.outputs.cache-hit != 'true' with: activate-environment: ${{ env.CONDA_ENV_NAME }} @@ -64,15 +58,11 @@ jobs: channels: conda-forge channel-priority: strict auto-update-conda: true - use-only-tar-bz2: true - - name: move profile - if: steps.cache.outputs.cache-hit != 'true' && runner.os != 'Windows' + - name: Fix windows .profile + if: steps.cache.outputs.cache-hit != 'true' && runner.os == 'Windows' run: | - # The setup-miniconda action leaves different shell init files for - # different OSes. Bash gives priority to ~/.bash_profile, so here we - # ensure that's used for all platforms. - mv ~/.profile ~/.bash_profile + cp ~/.bash_profile ~/.profile - name: install dependencies if: steps.cache.outputs.cache-hit != 'true' diff --git a/requirements/CI/conda.txt b/requirements/CI/conda.txt index 6954e1f5e..130afdbc0 100644 --- a/requirements/CI/conda.txt +++ b/requirements/CI/conda.txt @@ -1,2 +1,2 @@ -msprime==1.2.0 -slim==4.0 +msprime==1.3.3 +slim==4.3 diff --git a/requirements/CI/requirements.txt b/requirements/CI/requirements.txt index e03d2ffa8..9b4771056 100644 --- a/requirements/CI/requirements.txt +++ b/requirements/CI/requirements.txt @@ -1,21 +1,20 @@ -coverage==6.3.3 +coverage==7.5.4 flake8==5.0.4 -pytest==7.3.2 -pytest-cov==4.1.0 -pytest-xdist==3.3.1 -setuptools-scm==7.1.0 +pytest==8.2.2 +pytest-cov==5.0.0 +pytest-xdist==3.6.1 +setuptools-scm==8.1.0 sphinx==5.0.2 sphinx-argparse==0.4.0 sphinx-issues==3.0.1 sphinx_rtd_theme==1.2.0 sphinxcontrib-programoutput==0.17 -msprime==1.2.0 -attrs==21.4.0 +attrs==24.2.0 appdirs==1.4.4 -humanize==4.6.0 +humanize==4.10.0 pyslim==1.0.4 -numpy==1.23.5 -scipy==1.10.1 +numpy==1.26.4 +scipy==1.13.1 scikit-allel==1.3.6 biopython==1.80 demes==0.2.2