From ade37fd4ee0679a2202121cbb849aa96eb85f7b7 Mon Sep 17 00:00:00 2001 From: Ethan P Date: Wed, 19 Jun 2019 16:54:34 -0700 Subject: [PATCH] Added CircleCI support. --- .circleci/config-original.yml | 79 +++++++++++++++++ .circleci/config.yml | 162 ++++++++++++++++++++++++++++++++++ 2 files changed, 241 insertions(+) create mode 100644 .circleci/config-original.yml create mode 100644 .circleci/config.yml diff --git a/.circleci/config-original.yml b/.circleci/config-original.yml new file mode 100644 index 0000000..8fbabec --- /dev/null +++ b/.circleci/config-original.yml @@ -0,0 +1,79 @@ +version: 2.1 + +executors: + linux_alpine: + docker: + - image: alpine:latest + +commands: + setup: + description: "Set up the environment needed to test and run the scripts." + steps: + - run: + name: "APK: Add repository." + command: printf "\n%s\n" "http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories + - run: + name: "APK: Update cache." + command: apk update + - run: + name: "Setup: Install build packages." + command: apk add bash python2 + - run: + name: "Setup: Install runtime packages." + command: apk add bat ripgrep + + build: + description: "Build the self-contained scripts." + parameters: + minify: + type: string + default: "lib" + steps: + - run: + name: "Build" + command: ./build.sh --minify=<> + + +jobs: + + build: + executor: linux_alpine + steps: + - setup + - checkout + - build: + minify: "all" + + test-snapshots: + executor: linux_alpine + steps: + - setup + - checkout + - build: + minify: "all" + - run: + name: "Test: Snapshots" + command: test/run.sh snapshot-test + + test-consistency: + executor: linux_alpine + steps: + - setup + - checkout + - build: + minify: "all" + - run: + name: "Test: Consistency" + command: test/run.sh consistency-test + + +workflows: + version: 2 + default: + jobs: + - build + - test-snapshots: + requires: [build] + - test-consistency: + requires: [build] + diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..4ae9fdf --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,162 @@ +version: 2 +jobs: + build: + docker: + - image: alpine:latest + steps: + - run: + name: 'APK: Add repository.' + command: printf "\n%s\n" "http://nl.alpinelinux.org/alpine/edge/testing" >> + /etc/apk/repositories + - run: + name: 'APK: Update cache.' + command: apk update + - run: + name: 'Setup: Install build packages.' + command: apk add bash python2 + - run: + name: 'Setup: Install runtime packages.' + command: apk add bat ripgrep + - checkout + - run: + name: Build + command: ./build.sh --minify=all + test-snapshots: + docker: + - image: alpine:latest + steps: + - run: + name: 'APK: Add repository.' + command: printf "\n%s\n" "http://nl.alpinelinux.org/alpine/edge/testing" >> + /etc/apk/repositories + - run: + name: 'APK: Update cache.' + command: apk update + - run: + name: 'Setup: Install build packages.' + command: apk add bash python2 + - run: + name: 'Setup: Install runtime packages.' + command: apk add bat ripgrep + - checkout + - run: + name: Build + command: ./build.sh --minify=all + - run: + name: 'Test: Snapshots' + command: test/run.sh snapshot-test + test-consistency: + docker: + - image: alpine:latest + steps: + - run: + name: 'APK: Add repository.' + command: printf "\n%s\n" "http://nl.alpinelinux.org/alpine/edge/testing" >> + /etc/apk/repositories + - run: + name: 'APK: Update cache.' + command: apk update + - run: + name: 'Setup: Install build packages.' + command: apk add bash python2 + - run: + name: 'Setup: Install runtime packages.' + command: apk add bat ripgrep + - checkout + - run: + name: Build + command: ./build.sh --minify=all + - run: + name: 'Test: Consistency' + command: test/run.sh consistency-test +workflows: + version: 2 + default: + jobs: + - build + - test-snapshots: + requires: + - build + - test-consistency: + requires: + - build + +# Original config.yml file: +# version: 2.1 +# +# executors: +# linux_alpine: +# docker: +# - image: alpine:latest +# +# commands: +# setup: +# description: \"Set up the environment needed to test and run the scripts.\" +# steps: +# - run: +# name: \"APK: Add repository.\" +# command: printf \"\\n%s\\n\" \"http://nl.alpinelinux.org/alpine/edge/testing\" >> /etc/apk/repositories +# - run: +# name: \"APK: Update cache.\" +# command: apk update +# - run: +# name: \"Setup: Install build packages.\" +# command: apk add bash python2 +# - run: +# name: \"Setup: Install runtime packages.\" +# command: apk add bat ripgrep +# +# build: +# description: \"Build the self-contained scripts.\" +# parameters: +# minify: +# type: string +# default: \"lib\" +# steps: +# - run: +# name: \"Build\" +# command: ./build.sh --minify=<> +# +# +# jobs: +# +# build: +# executor: linux_alpine +# steps: +# - setup +# - checkout +# - build: +# minify: \"all\" +# +# test-snapshots: +# executor: linux_alpine +# steps: +# - setup +# - checkout +# - build: +# minify: \"all\" +# - run: +# name: \"Test: Snapshots\" +# command: test/run.sh snapshot-test +# +# test-consistency: +# executor: linux_alpine +# steps: +# - setup +# - checkout +# - build: +# minify: \"all\" +# - run: +# name: \"Test: Consistency\" +# command: test/run.sh consistency-test +# +# +# workflows: +# version: 2 +# default: +# jobs: +# - build +# - test-snapshots: +# requires: [build] +# - test-consistency: +# requires: [build] \ No newline at end of file