-
-
Notifications
You must be signed in to change notification settings - Fork 113
Closed
Description
Rationale
We have warnings in the code, if on Alpine - See #246
but we now have native musl based shared libraries for the pact_ffi
https://github.com/pact-foundation/pact-reference/releases/tag/libpact_ffi-v0.4.23
- libpact_ffi-linux-aarch64-musl.a.gz
- libpact_ffi-linux-aarch64-musl.so.gz
- libpact_ffi-linux-x86_64-musl.a.gz
- libpact_ffi-linux-x86_64-musl.so.gz
It would be nice to add proper support for these variants in pact-go
Approach
- When detecting musl, instead of warning user, provide download for *.so musl variant in https://github.com/pact-foundation/pact-go/blob/master/installer/installer.go
- Update tests to reflect https://github.com/pact-foundation/pact-go/blob/master/installer/installer_test.go
- Create Dockerfile for golang alpine https://github.com/pact-foundation/pact-go/blob/master/Dockerfile
- Update Makefile to run either debian or alpine based image
Lines 39 to 58 in a1e63fc
docker_build: docker build -f Dockerfile --build-arg GO_VERSION=${GO_VERSION} -t pactfoundation/pact-go-test . docker_test: docker_build docker run \ -e LOG_LEVEL=INFO \ --rm \ pactfoundation/pact-go-test \ /bin/sh -c "make test" docker_pact: docker_build docker run \ -e LOG_LEVEL=INFO \ --rm \ pactfoundation/pact-go-test \ /bin/sh -c "make pact_local" docker_test_all: docker_build docker run \ -e LOG_LEVEL=INFO \ --rm \ pactfoundation/pact-go-test \ /bin/sh -c "make test && make pact_local" - Update CI to test amd64 alpine variant
pact-go/.github/workflows/test.yml
Lines 69 to 82 in a1e63fc
test-containers: runs-on: ubuntu-latest name: ${{ matrix.go-version }}-test-container strategy: fail-fast: false matrix: go-version: ["1.21", "1.22"] steps: - uses: actions/checkout@v4 - name: Test dockerfile run: make docker_test_all env: GO_VERSION: ${{ matrix.go-version }}
Metadata
Metadata
Assignees
Labels
No labels