diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2c700a8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: ci +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] +jobs: + build: + strategy: + fail-fast: false + matrix: + platform: + - ubuntu-18.04 + runs-on: ${{ matrix.platform }} + steps: + - name: Check out + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Linux Get dependencies + run: sudo apt install -y build-essential libncurses5-dev libreadline-dev libssl-dev perl luarocks + + - name: Linux Before install + run: | + sudo luarocks install luacheck + + - name: Linux Install + run: | + wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add - + sudo apt-get -y install software-properties-common + sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" + sudo apt-get update + sudo apt-get install openresty + + - name: Linux Script + run: | + sudo luarocks install rockspec/jsonschema-master-0.rockspec + export PATH=$OPENRESTY_PREFIX/nginx/sbin:$PATH + make test diff --git a/.gitignore b/.gitignore index f48a7e8..1efbc9f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ test*.lua go \.* +!.github/ deps