Skip to content

Commit

Permalink
Fix broken test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nhatthm committed Feb 14, 2024
1 parent 8c56bb0 commit 617e4ed
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand All @@ -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: |
Expand Down

0 comments on commit 617e4ed

Please sign in to comment.