-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
github-actions[bot]
committed
Dec 18, 2019
1 parent
88b29a4
commit f41ada3
Showing
5 changed files
with
5,362 additions
and
62 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,71 @@ | ||
# setup-conda | ||
Github Action which installs conda | ||
|
||
[![Tests](https://github.com/s-weigand/setup-conda/workflows/Tests/badge.svg)](https://github.com/s-weigand/setup-conda/actions) | ||
|
||
This action adds the [`conda`](https://conda.io/projects/conda/en/latest/user-guide/tasks/index.html) | ||
command from the on the worker preinstalled miniconda version to the known shell commands. | ||
|
||
## Inputs | ||
|
||
| Name | Requirement | Default | Description | | ||
| ---------------- | ----------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `activate-conda` | _optional_ | `true` | Wether to activate the conda base env. | | ||
| `update-conda` | _optional_ | `false` | If conda should be updated before running other commands. | | ||
| `python-version` | _optional_ | `'default'` | Python version which should be installed with conda. | | ||
| `conda-channels` | _optional_ | `''` | Additional channels like 'conda-forge', as coma separated list, which can be used to install packages. The last channel in the list, will have the highest priority. | | ||
|
||
# Usage | ||
|
||
See [action.yml](action.yml) | ||
|
||
## Basic: | ||
|
||
The basic usage makes the conda python version the default python (`$ conda activate base`). | ||
|
||
```yaml | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: s-weigand/setup-conda@v1 | ||
- run: conda --version | ||
- run: which python | ||
``` | ||
If don't want to change the python version which is used | ||
(i.e. you just need to install a none python package), you can use `activate-conda: false`. | ||
|
||
```yaml | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- uses: s-weigand/setup-conda@v1 | ||
with: | ||
activate-conda: false | ||
- run: conda --version | ||
- run: which python | ||
``` | ||
|
||
## Matrix Testing: | ||
|
||
```yaml | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
python-version: [3.6, 3.7, 3.8] | ||
name: Python ${{ matrix.python-version }} example | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup conda | ||
uses: s-weigand/setup-conda@v1 | ||
with: | ||
update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
conda-channels: anaconda, conda-forge | ||
- run: conda --version | ||
- run: which python | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: 'setup-conda' | ||
description: 'Setup conda to use in later actions' | ||
author: 'Sebastian Weigand' | ||
inputs: | ||
activate-conda: | ||
description: "Wether to activate the conda base env (Default: 'true')" | ||
required: false | ||
default: 'true' | ||
update-conda: | ||
description: "If conda should be updated before running other commands (Default: 'false')" | ||
required: false | ||
default: 'false' | ||
python-version: | ||
description: "Python version which should be installed with conda (default: 'Default')" | ||
required: false | ||
default: 'default' | ||
conda-channels: | ||
description: "Additional channels like 'conda-forge' which can be used to install packages" | ||
required: false | ||
default: '' | ||
|
||
runs: | ||
using: 'node12' | ||
main: 'dist/index.js' | ||
|
||
branding: | ||
icon: 'code' | ||
color: 'yellow' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"owner":"s-weigand","repo":"setup-conda","sha":"fd29ea5827f85aedaf899dc6bcaa8744b2e2d948","ref":"refs/tags/v1.0.2","tagName":"v1.0.2","branch":"release","tags":["v1","v1.0.2"],"updated_at":"2019-12-18T20:30:55.396Z"} |
Oops, something went wrong.