dive-zfs/.circleci/config.yml
Alex Goodman 776c1f9436
add tests
2019-11-27 23:07:56 -05:00

60 lines
1.4 KiB
YAML

version: 2.1
jobs:
run-static-analyses:
parameters:
version:
type: string
working_directory: /home/circleci/app
docker:
- image: circleci/golang:<< parameters.version >>
environment:
GO111MODULE: "on"
steps:
- checkout
- restore_cache:
keys:
- golang-<< parameters.version >>-{{ checksum "go.sum" }}
- run: make ci-install-go-tools
- save_cache:
key: golang-<< parameters.version >>-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"
- run:
name: run static analysis
command: make ci-static-analysis
run-tests:
parameters:
version:
type: string
working_directory: /home/circleci/app
docker:
- image: circleci/golang:<< parameters.version >>
environment:
GO111MODULE: "on"
steps:
- checkout
- restore_cache:
keys:
- golang-<< parameters.version >>-{{ checksum "go.sum" }}
- run: make ci-install-go-tools
- save_cache:
key: golang-<< parameters.version >>-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"
- run:
name: run unit tests
command: make ci-unit-test
workflows:
commit:
jobs:
- run-static-analyses:
version: "1.13"
- run-tests:
version: "1.12"
- run-tests:
version: "1.13"