.circleci/config.yml
version: 2.1
# Define the executor type
executors:
xcode10:
macos:
xcode: 10.3.0 # Mojave 10.14.4
xcode11:
macos:
xcode: 11.7.0 # Catalina 10.15.5
xcode12:
macos:
xcode: 12.5.1 # Big Sur 11.6.2
xcode13:
macos:
xcode: 13.3.1 # Monterey 12.3.1
jobs:
lint:
docker:
- image: koalaman/shellcheck-alpine:v0.8.0
steps:
- checkout
- run: shellcheck shellspec $(find lib libexec spec examples -name '*.sh')
report:
working_directory: ~/shellspec
docker:
- image: alpine
steps:
- run: apk add --no-progress --no-cache ca-certificates
- checkout
- run: ./shellspec --task fixture:stat:prepare
- run: ./shellspec -o tap -o junit
- run:
command: |
mkdir -p ~/report/shellspec
cp report/results_junit.xml ~/report/shellspec/
when: always
- store_test_results:
path: ~/report
- store_artifacts:
path: report
coverage:
working_directory: ~/shellspec
docker:
- image: shellspec/kcov
steps:
- checkout
- run: ./shellspec --task fixture:stat:prepare
- run: ./shellspec --kcov
- store_artifacts:
path: coverage
test:
# Using parameters
parameters:
os:
type: executor
executor: << parameters.os >>
steps:
- checkout
- run: ./shellspec --shell sh --task fixture:stat:prepare
- run: contrib/all.sh contrib/various_test.sh
workflows:
lint_report_coverage:
jobs:
- lint
- report
- coverage:
requires:
- lint
- report
daily_update_schedule:
jobs:
- lint
- coverage:
requires:
- lint
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
all-tests:
jobs:
- test:
matrix:
parameters:
os: [xcode10, xcode11, xcode12, xcode13]