Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script test #16

Merged
merged 4 commits into from
Oct 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Test install scripts

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test_install:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-latest, shell: bash, shell-source-param: -i}
- {os: macos-latest, shell: zsh, shell-source-param: -i}
- {os: macos-latest, shell: bash, shell-source-param: -l}
- {os: windows-latest, shell: bash, shell-source-param: -l}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Micromamba (${{ matrix.os }}, ${{ matrix.shell }})
# Need to force the shell to get the default *calling* shell right
run: |
${{ matrix.shell }} -c 'cat ./install.sh | ${SHELL}'
- name: Test Micromamba
# use either -l or -i to source .bash_profile or .bashrc/.zshrc
run: |
${{ matrix.shell }} ${{ matrix.shell-source-param }} -ec micromamba
- name: Test Micromamba is found
# use either -l or -i to source .bash_profile or .bashrc/.zshrc
run: |
${{ matrix.shell }} ${{ matrix.shell-source-param }} -ec micromamba --help
- name: Test Micromamba is found
# use either -l or -i to source .bash_profile or .bashrc/.zshrc
run: |
${{ matrix.shell }} ${{ matrix.shell-source-param }} -ec micromamba --help
- name: Test create environment
# use either -l or -i to source .bash_profile or .bashrc/.zshrc
run: |
${{ matrix.shell }} ${{ matrix.shell-source-param }} -ec micromamba create -c conda-forge -n test python
- name: Test activate environment
# use either -l or -i to source .bash_profile or .bashrc/.zshrc
run: |
${{ matrix.shell }} ${{ matrix.shell-source-param }} -ec micromamba activate -n test