Here is a portion of my config. (This is the part that is failing on the $OSTYPE call.) the checkout and setup steps work. The error occurs during the run step while running the unit tests.
version: 2
variables:
setup_p2: &setup_p2
run:
shell: /bin/bash
name: Setup
command: bash .circleci/setup.sh
linux: &linux
machine: true
jobs:
test-linux:
<<: *linux
steps:
- checkout
- *setup
- run:
shell: /bin/bash
name: ggd unit tests (Linux)
command: py.test tests/ --duration=0 -v
no_output_timeout: 9900
workflows:
version: 2
ggd-unit-tests:
jobs:
- test-linux
In the setup step the $OSTYPE environment variable is available. I use it to distinguish between macos and linux. Here is a snippet from my setup.sh script:
if [[ $OSTYPE == darwin* ]]; then
tag="MacOSX"
tag2="darwin"
elif [[ $OSTYPE == linux* ]]; then
tag="Linux"
tag2="linux"
fi
However, it does not work during the run step.