Skip to content

fix: rockspec info JSON was generated incorrectly #293

fix: rockspec info JSON was generated incorrectly

fix: rockspec info JSON was generated incorrectly #293

Workflow file for this run

name: Run CI
on:
push:
branches: [ main ]
paths-ignore:
- '**.md' # Do not need to run CI for markdown changes.
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'
jobs:
rockspec-info:
uses: ./.github/workflows/rockspec-info.yml
rockspecs:
needs: rockspec-info
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
data=$(echo '${{ needs.rockspec-info.outputs.info }}' | jq -c 'to_entries | map(.value.rockspec)')
echo "matrix=$data" >> $GITHUB_OUTPUT
linux-build:
needs: rockspecs
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ["5.1", "5.2", "5.3", "luajit-2.0.5"]
package: ${{ fromJSON(needs.rockspecs.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/ci
with:
lua-version: ${{ matrix.version }}
rockspec: ${{ matrix.package }}
hello-haproxy:
runs-on: ubuntu-latest
env:
LD_SDK_KEY: "foo"
steps:
- uses: actions/checkout@v4
- name: Build hello-haproxy image
run: |
docker build -t launchdarkly:hello-haproxy -f ./examples/hello-haproxy/Dockerfile .
- name: Run hello-haproxy container in background
run: |
docker run -dit --rm --name hello-haproxy -p 8123:8123 --env LD_SDK_KEY="$LD_SDK_KEY" launchdarkly:hello-haproxy
- name: Evaluate feature flag
run: |
curl --retry 5 --retry-all-errors --retry-delay 1 -s -v http://localhost:8123 | tee response.txt
grep -F "Feature flag is false for this user" response.txt || (echo "Expected false evaluation!" && exit 1)
- name: Stop hello-haproxy container
run: |
docker stop hello-haproxy