Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: ci
on: [push, pull_request]
on:
push:
branches: '*'
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
Expand All @@ -18,13 +21,23 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: yarn
- run: yarn --frozen-lockfile
- run: yarn build
- run: yarn test:unit
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: yarn
- run: yarn --frozen-lockfile
- run: yarn check:lint
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: yarn --frozen-lockfile
- run: yarn test:system basic
21 changes: 21 additions & 0 deletions system-tests/src/tests/basic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const chalk = require('chalk');
const path = require('path');

const run = require('../utils/run');

console.log(chalk.bold.blue(`Working directory: ${process.cwd()}`));

const miniAppName = 'BasicMiniApp';
run(`create-miniapp ${miniAppName} --packageName basic-miniapp --skipNpmCheck --skipInstall`);

const miniAppPath = path.join(process.cwd(), miniAppName);

// Escape backslashes on Windows
const miniApp = `file:${
process.platform === 'win32'
? miniAppPath.replace(/\\/g, '\\\\')
: miniAppPath
}`;

run(`create-container -m ${miniApp} -p android`);
run(`create-container -m ${miniApp} -p ios --skipInstall`);
10 changes: 8 additions & 2 deletions system-tests/src/tests/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,15 @@ run(
{ expectedExitCode: 1 },
);

// Escape backslashes on Windows
const miniApp = `file:${
process.platform === 'win32'
? miniAppPath.replace(/\\/g, '\\\\')
: miniAppPath
}`;
// Container gen should be successful for the two following commands
run(`create-container --miniapps file:${miniAppPath} -p android`);
run(`create-container --miniapps file:${miniAppPath} -p ios --skipInstall`);
run(`create-container --miniapps ${miniApp} -p android`);
run(`create-container --miniapps ${miniApp} -p ios --skipInstall`);

// transform-container / publish-container should be successful
run(
Expand Down