From f6bd2960a354ebf19e8bb7393c6bd4cbcb893bc6 Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Wed, 13 Nov 2024 20:14:02 +0100 Subject: [PATCH] Add ci that runs test with jq, jqjq (jq) and jqjq (gojq) --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a02c75b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: + - "master" + pull_request: + +jobs: + test-jq: + name: Run tests with jq + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: | + curl -sOLJ 'https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64' + chmod a+x jq-linux-amd64 + make test-jq JQ=./jq-linux-amd64 + + test-jqjq-jq: + name: Run tests with jqjq using jq + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # does PATH tricks so that jq that runs invoke_client_jqjq is same jq + - run: | + curl -sOLJ 'https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64' + mv jq-linux-amd64 jq + chmod a+x jq + PATH="$PWD:$PATH" make test-jqjq JQ=jq + + test-jqjq-gojq: + name: Run tests with jqjq using gojq + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: | + curl -sOLJ 'https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64' + mv jq-linux-amd64 jq + chmod a+x jq + curl -Ls 'https://github.com/itchyny/gojq/releases/download/v0.12.16/gojq_v0.12.16_linux_amd64.tar.gz' | tar xz + mv gojq*/gojq gojq + PATH="$PWD:$PATH" make test-jqjq JQ=gojq