Skip to content

Instantly share code, notes, and snippets.

@koral--
Created October 16, 2018 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koral--/dad14633121bbf14d3fb384b2b79a79e to your computer and use it in GitHub Desktop.
Save koral--/dad14633121bbf14d3fb384b2b79a79e to your computer and use it in GitHub Desktop.
Bitrise step test workflow
test:
steps:
- go-list: {}
- golint: {}
- errcheck: {}
- script:
inputs:
- content: |-
#!/usr/bin/env bash
go vet
- go-test: {}
- change-workdir:
title: Switch working dir to test / _tmp dir
description: |-
To prevent step testing issues, like referencing relative
files with just './some-file' in the step's code, which would
work for testing the step from this directory directly
but would break if the step is included in another `bitrise.yml`.
run_if: "true"
inputs:
- path: ./_tmp
- is_create_path: true
- path::./:
title: Step Test
- script:
title: Verify environment
inputs:
- content: |-
#!/usr/bin/env bash
set -e
if [[ -z "$CHUCK_NORRIS_JOKE" ]]; then
echo "CHUCK_NORRIS_JOKE environment variable is empty or not set"
exit 1
fi
echo "This output was generated by the Step (CHUCK_NORRIS_JOKE): $CHUCK_NORRIS_JOKE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment