Skip to content

Commit

Permalink
test5: remove fontconfig in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
yisibl committed Aug 9, 2023
1 parent 94eb60f commit 8ebc6d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ jobs:
setup: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf -y
# sudo apt-get install libfontconfig1 -y
build: |
yarn build --target armv7-unknown-linux-gnueabihf
arm-linux-gnueabihf-strip *.node
Expand Down Expand Up @@ -406,9 +405,6 @@ jobs:
run: |
set -e
find /usr/share/fonts -name *.ttf
apt-get install fontconfig -y
fc-cache --force
fc-list :lang=en
ls -la
yarn test
test-linux-aarch64-musl-binding:
Expand Down Expand Up @@ -445,9 +441,6 @@ jobs:
run: |
set -e
find /usr/share/fonts -name *.ttf
apk add fontconfig
fc-cache --force
fc-list :lang=en
apk add nodejs npm yarn
yarn test
test-linux-arm-gnueabihf-binding:
Expand Down Expand Up @@ -490,9 +483,6 @@ jobs:
run: |
set -e
find /usr/share/fonts -name *.ttf
apt-get install fontconfig -y
fc-cache --force
fc-list :lang=en
ls -la
yarn test
Expand Down
4 changes: 2 additions & 2 deletions __test__/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ test('should be load custom fontDirs(no defaultFontFamily option)', (t) => {
t.is(originPixels.join(',').match(/0,0,255/g)?.length, 1726)
})

test.only('The defaultFontFamily is not found in the OS and needs to be fallback', async (t) => {
test('The defaultFontFamily is not found in the OS and needs to be fallback', async (t) => {
const svg = `
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="200" viewBox="0 0 300 200">
<text fill="blue" font-family="" font-size="100">
Expand Down Expand Up @@ -317,7 +317,7 @@ test.only('The defaultFontFamily is not found in the OS and needs to be fallback
const resvg = new Resvg(svg, {
font: {
loadSystemFonts: true,
// fontDirs: ['/usr/share/fonts/'], // 防止在 CI 的 Docker 环境找不到字体
fontDirs: ['/usr/share/fonts/'], // 防止在 CI 的 Docker 环境找不到字体
defaultFontFamily: 'this-is-a-non-existent-font-family',
},
logLevel: 'debug',
Expand Down

0 comments on commit 8ebc6d2

Please sign in to comment.