sliproad/.circleci/config.yml
Gabriel Simmer c28851fcc3
Tests & CI, io.Reader > Multipart file.
Making some improvements to the future maintainability of the project,
namely in the form of tests. Also implemented a new "dist" command to
the Makefile that packs up the binaries, and will eventually be expanded
to do more legwork when prepping for a release.

Updated file providers to use io.Reader over an explicit multipart file,
and removed the handler in favour of a plain filename, since that was
it's primary purpose.
2020-04-03 13:26:06 +01:00

55 lines
1.3 KiB
YAML

version: 2.1
jobs:
build:
docker:
- image: cimg/go:1.14
steps:
- checkout
- restore_cache:
keys:
- go-mod-{{ checksum "go.sum" }}-v1
- go-mod-{{ checksum "go.sum" }}
- go-mod
- restore_cache:
keys:
- upx-3.96
- run:
name: Install UPX
command: |
if ! type "upx" > /dev/null; then
wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz
tar xf upx-3.96-amd64_linux.tar.xz
sudo mv upx-3.96-amd64_linux/upx /usr/local/bin
chmod +x /usr/local/bin/upx
fi
- run:
command: make dist
- store_artifacts:
path: /go/src/github.com/gmemstr/build
- save_cache:
key: go-mod-{{ checksum "go.sum" }}-v1
paths:
- /go/pkg/mod
- save_cache:
key: upx-3.96
paths:
- /usr/local/bin/upx
test:
docker:
- image: cimg/go:1.14
steps:
- checkout
- restore_cache:
keys:
- go-mod-{{ checksum "go.sum" }}-v1
- go-mod-{{ checksum "go.sum" }}
- go-mod
- run:
command: make test
workflows:
version: 2
build-and-test:
jobs:
- build
- test