diff --git a/.github/versions/go b/.github/versions/go
new file mode 100644
index 0000000..4ea8ad8
--- /dev/null
+++ b/.github/versions/go
@@ -0,0 +1 @@
+1.14.3
diff --git a/.github/workflows/go-bump.yml b/.github/workflows/go-bump.yml
new file mode 100644
index 0000000..e6ee17e
--- /dev/null
+++ b/.github/workflows/go-bump.yml
@@ -0,0 +1,29 @@
+name: Bump Go
+
+on:
+ schedule:
+ - cron: 00 7 * * *
+
+ push:
+ branches:
+ - master
+
+jobs:
+ go-bump:
+
+ runs-on: ubuntu-20.04
+
+ steps:
+ - name: Clone current repo
+ uses: actions/checkout@v2
+
+ - name: Bump Go
+ id: go-bump
+ uses: panchoh/go-bump@master
+
+ - name: Create pull request
+ uses: peter-evans/create-pull-request@v2
+ with:
+ title: ${{ steps.go-bump.outputs.pr-title }}
+ commit-message: ${{ steps.go-bump.outputs.pr-title }}
+ branch: ${{ steps.go-bump.outputs.branch-name }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 7794600..ca1214a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -5,9 +5,6 @@ on:
tags:
- v*.*.*
-env:
- GO_VERSION: 1.14.4
-
jobs:
build:
@@ -18,6 +15,11 @@ jobs:
with:
fetch-depth: 0
+ - name: Load Go version
+ id: go-version
+ run: |
+ echo "::set-env name=GO_VERSION::$(tr -d '\n' < .github/versions/go)"
+
- uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..19db4c9
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,23 @@
+name: Test
+
+on:
+ push:
+
+jobs:
+ build:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Lint
+ uses: golangci/golangci-lint-action@v1
+ with:
+ version: v1.27
+
+ - name: Build
+ run: |
+ make test race build
+
+ - name: Spec test
+ run: |
+ docker run --mount type=bind,source=$(pwd)/build/kapow,target=/usr/local/bin/kapow bbvalabsci/kapow-spec-test-suite:latest behave --tags=~@skip
diff --git a/README.md b/README.md
index 288aea1..9d6b54a 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
-
+
diff --git a/docs/source/concepts/resource_tree.rst b/docs/source/concepts/resource_tree.rst
index 50dd3e1..53f3c3f 100644
--- a/docs/source/concepts/resource_tree.rst
+++ b/docs/source/concepts/resource_tree.rst
@@ -21,7 +21,7 @@ Overview
/
│
├─ request
- │ ├──── method Used HTTP Method (GET, POST)
+ │ ├──── method HTTP Method used (GET, POST)
│ ├──── host Host part of the URL
│ ├──── path Complete URL path (URL-unquoted)
│ ├──── matches
diff --git a/docs/source/examples/working_with_pow_files.rst b/docs/source/examples/working_with_pow_files.rst
index 8110fa2..8343f4b 100644
--- a/docs/source/examples/working_with_pow_files.rst
+++ b/docs/source/examples/working_with_pow_files.rst
@@ -84,8 +84,6 @@ whole thing documented in one html file, served with *Kapow!*.
:linenos:
$ cat index.pow
- #!/usr/bin/env bash
-
kapow route add / - <<-'EOF'
cat howto.html | kapow set /response/body
EOF
@@ -99,22 +97,19 @@ source. In fact, a `pow` file is just a regular shell script.
Debugging scripts
-----------------
-Kapow! redirect standard output and standard error of the pow file given on server
-startup to its own standard output and error, so you can use ``set -x`` at the beginning
-of the script in order to be able to see all the commands expanded and usethat information
-for debugging.
+Since *Kapow!* redirects the standard output and the standard error of the `pow`
+file given on server startup to its own, you can leverage ``set -x`` to see the
+commands that are being executed, and use that for debugging.
-In order to be able to debug user request executions, the server subcommand has
-a ``--debug`` option flag that redirects the script standard output and standard error
-to Kapow! standard output, so you can use ``set -x`` at the beginning of the script
-the same way as in pow files.
+To support debugging user request executions, the server subcommand has a
+``--debug`` option flag that prompts *Kapow!* to redirect both the script's
+standard output and standard error to *Kapow!*'s standard output, so you can
+leverage ``set -x`` the same way as with `pow` files.
.. code-block:: console
$ cat withdebug.pow
- #!/usr/bin/env bash
-
kapow route add / - <<-'EOF'
set -x
echo "This will be seen in the log"
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 8f53bb2..2014648 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -1,8 +1,8 @@
Welcome to *Kapow!*
===================
-.. image:: https://circleci.com/gh/BBVA/kapow/tree/master.svg?style=svg
- :target: https://circleci.com/gh/BBVA/kapow/tree/master
+.. image:: https://github.com/BBVA/kapow/workflows/Test/badge.svg
+ :target: https://github.com/BBVA/kapow/actions?query=workflow%3ATest
.. image:: https://goreportcard.com/badge/github.com/bbva/kapow
:target: https://goreportcard.com/report/github.com/bbva/kapow
.. image:: https://img.shields.io/github/issues/BBVA/kapow
diff --git a/docs/source/tutorial/tutorial02.rst b/docs/source/tutorial/tutorial02.rst
index 732834c..24cc043 100644
--- a/docs/source/tutorial/tutorial02.rst
+++ b/docs/source/tutorial/tutorial02.rst
@@ -21,9 +21,8 @@ What have we done?
**Junior**
- Got it! There're a
- `lot of resources to work with `_, I see that we
- can write to the response. Do you think this will work for us?
+ Got it! There're a :ref:`lot of resources to work with