From 617e4ed5863ffa0daba1b31a598eec09e09b8ffe Mon Sep 17 00:00:00 2001 From: nhatthm Date: Wed, 14 Feb 2024 14:24:43 +0100 Subject: [PATCH] Fix broken test workflow --- .github/workflows/test.yaml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e7ba2ee..6f2fbe5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,6 +16,7 @@ jobs: outputs: go-latest-version: ${{ steps.find-go-version.outputs.go-latest-version }} go-supported-versions: ${{ steps.find-go-version.outputs.go-supported-versions }} + python-version: ${{ steps.setup.outputs.PYTHON_VERSION }} steps: - name: Checkout code uses: nhatthm/gh-actions/checkout@master @@ -24,12 +25,19 @@ jobs: name: Find Go version uses: nhatthm/gh-actions/find-go-version@master + - name: Setup + id: setup + run: | + make "$GITHUB_OUTPUT" + test: strategy: fail-fast: false matrix: go-version: ${{ fromJson(needs.setup.outputs.go-supported-versions) }} runs-on: ubuntu-latest + container: + image: python:${{ needs.setup.outputs.python-version }}-bookworm needs: [setup] env: GO_LATEST_VERSION: ${{ needs.setup.outputs.go-latest-version }} @@ -46,18 +54,14 @@ jobs: with: go-version: ${{ matrix.go-version }} - - name: Install Python - uses: nhatthm/gh-actions/setup-python@master - with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Install Dependencies + env: + PYTHON_VERSION: ${{ needs.setup.outputs.python-version }} run: | - sudo apt-get update - sudo apt-get install -y python3-dev python3-fontforge - ls -la /usr/lib/python3/dist-packages/ - ln -s /usr/lib/python3/dist-packages/fontforge.cpython-${${PYTHON_VERSION%.*}//.}-x86_64-linux-gnu.so /usr/local/lib/python${PYTHON_VERSION%.*}/site-packages/fontforge.so \ - ln -s /usr/lib/python3/dist-packages/psMat.cpython-${${PYTHON_VERSION%.*}//.}-x86_64-linux-gnu.so /usr/local/lib/python${PYTHON_VERSION%.*}/site-packages/psMat.so \ + apt-get update + apt-get install -y python3-dev python3-fontforge + ln -s /usr/lib/python3/dist-packages/fontforge.cpython-${PYTHON_VERSION//.}-x86_64-linux-gnu.so /usr/local/lib/python${PYTHON_VERSION}/site-packages/fontforge.so \ + ln -s /usr/lib/python3/dist-packages/psMat.cpython-${PYTHON_VERSION//.}-x86_64-linux-gnu.so /usr/local/lib/python${PYTHON_VERSION}/site-packages/psMat.so \ - name: Test run: |