fix: test

This commit is contained in:
msojocs 2023-09-23 20:57:28 +08:00
parent a972b98f16
commit 736bf03cf8
4 changed files with 27 additions and 4 deletions

View File

@ -30,8 +30,6 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
- name: Prepare
run: |
@ -90,6 +88,17 @@ jobs:
node-version: [16.x]
ARCH: ['x86_64']
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
# Version Spec of the version to use in SemVer notation.
# It also emits such aliases as lts, latest, nightly and canary builds
# Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node
node-version: '16.20.2'
check-latest: false
- name: Download artifacts
uses: actions/download-artifact@v2
@ -115,6 +124,7 @@ jobs:
sudo apt update
sudo apt install -y wine64
sudo apt-add-repository universe
sudo dpkg --add-architecture i386
dpkg --print-foreign-architectures
@ -122,15 +132,24 @@ jobs:
sudo apt install libwine
echo "install wine32..."
sudo apt install wine32
sudo apt-get install wine-binfmt
sudo update-binfmts --import /usr/share/binfmts/wine
corepack enable
ls -l
mkdir build
cp **build/{wcc, wcsc} build
cp **build/wcc build
cp **build/wcsc build
chmod +x build/*
ls -l build
node -v
pnpm install
- name: Test
run: |
ls -l test/wine
# ./test/wine/wcc.exe
pnpm run test-prepare
pnpm run test
upload:

View File

@ -1,6 +1,6 @@
version: "3"
services:
wechat_devtools:
wx_compiler:
image: jiyecafe/wechat-devtools-build:v3
# build:
# context: ./docker

View File

@ -4,6 +4,7 @@ test_dir=$(cd `dirname $0`/../.. && pwd -P)
project_dir="$test_dir/projects/${0##*/}"
cd "$project_dir"
echo "prepare for ${project_dir}"
git submodule set-url miniprogram/packageSkylineExamples https://github.com/wechat-miniprogram/awesome-skyline.git
git submodule update

View File

@ -5,9 +5,12 @@ test_dir=$(cd `dirname $0`/../.. && pwd -P)
project_dir="$test_dir/projects/${0##*/}"
cd "$project_dir"
echo "prepare for ${project_dir}"
echo "exec pnpm install"
sed -i 's#"^#"~#g' ./package.json
pnpm install
pnpm add tdesign-miniprogram@1.0.0
echo "build miniprogram_npm"
node "$test_dir/spec/build-npm-mini.js" "$project_dir"