Example 2: Other shells #2153
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
name: "Example 2: Other shells" | |
on: | |
pull_request: | |
branches: | |
- "*" | |
push: | |
branches: | |
- "develop" | |
- "main" | |
- "master" | |
schedule: | |
# Note that cronjobs run on master/main by default | |
- cron: "0 0 * * *" | |
concurrency: | |
group: | |
${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
example-2-linux: | |
# prevent cronjobs from running on forks | |
if: | |
(github.event_name == 'schedule' && github.repository == | |
'conda-incubator/setup-miniconda') || (github.event_name != 'schedule') | |
name: Ex2 Linux | |
runs-on: "ubuntu-latest" | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./ | |
with: | |
miniconda-version: "latest" | |
activate-environment: foo | |
- name: Bash | |
shell: bash -el {0} | |
run: | | |
conda info | |
conda list | |
printenv | sort | |
- name: PowerShell Core | |
shell: pwsh | |
run: | | |
conda info | |
conda list | |
gci env:* | sort-object name | |
example-2-mac: | |
name: Ex2 Mac | |
runs-on: "macos-latest" | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./ | |
with: | |
miniconda-version: "latest" | |
activate-environment: foo | |
- name: Sh | |
shell: sh -l {0} | |
run: | | |
conda info | |
conda list | |
printenv | sort | |
- name: Bash | |
shell: bash -el {0} | |
run: | | |
conda info | |
conda list | |
printenv | sort | |
- name: PowerShell Core | |
shell: pwsh | |
run: | | |
conda info | |
conda list | |
gci env:* | sort-object name | |
example-2-win: | |
name: Ex2 Windows | |
runs-on: "windows-latest" | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./ | |
with: | |
auto-update-conda: true | |
activate-environment: foo | |
use-only-tar-bz2: true | |
- name: Bash | |
shell: bash -el {0} | |
run: | | |
conda info | |
conda list | |
printenv | sort | |
- name: Sh | |
shell: sh -l {0} | |
run: | | |
conda info | |
conda list | |
printenv | sort | |
- name: PowerShell | |
shell: powershell | |
run: | | |
conda info | |
conda list | |
dir env: | %{"{0}={1}" -f $_.Name,$_.Value} | |
- name: PowerShell Core | |
shell: pwsh | |
run: | | |
conda info | |
conda list | |
dir env: | %{"{0}={1}" -f $_.Name,$_.Value} | |
- name: Cmd.exe | |
shell: cmd /C CALL {0} | |
run: >- | |
conda info && conda list && SET |