-
-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* main: Prepare for release 2.20.0. Update manual workflow. Support choosing channel to download SDK components from. build-tools to 31.0.0; SDK cmd-line tools to 5.0. (#174) Fix macos-11 VM label. Realm JavaScript is using Android Emulator Runner (#182) Add MobileRT to the list of projects (#181) Support non-mobile targets (Wear OS, TV) (#180) Bump path-parse from 1.0.6 to 1.0.7
- Loading branch information
Showing
21 changed files
with
268 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Manually triggered workflow | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
os: | ||
description: 'OS' | ||
required: true | ||
default: 'macos-latest' | ||
api-level: | ||
description: 'API level of the platform and system image' | ||
required: true | ||
default: '30' | ||
target: | ||
description: 'target of the system image - default, google_apis, google_apis_playstore, android-wear, android-wear-cn, android-tv or google-tv' | ||
required: true | ||
default: 'default' | ||
arch: | ||
description: 'CPU architecture of the system image - x86, x86_64 or arm64-v8a' | ||
default: 'x86' | ||
emulator-options: | ||
description: 'command-line options used when launching the emulator' | ||
default: '-no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim' | ||
emulator-build: | ||
description: 'build number of a specific version of the emulator binary to use' | ||
channel: | ||
description: 'Channel to download the SDK components from - `stable`, `beta`, `dev`, `canary`' | ||
default: 'stable' | ||
script: | ||
description: 'custom script to run - e.g. `./gradlew connectedCheck`' | ||
required: true | ||
default: './gradlew connectedDebugAndroidTest' | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ github.event.inputs.os }} | ||
env: | ||
JAVA_TOOL_OPTIONS: -Xmx4g | ||
timeout-minutes: 15 | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: validate gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: build, test and lint | ||
run: | | ||
npm install | ||
npm run build | ||
npm run lint | ||
npm test | ||
- name: Java 15 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 15 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | ||
|
||
- name: run action | ||
uses: ./ | ||
with: | ||
api-level: ${{ github.event.inputs.api-level }} | ||
target: ${{ github.event.inputs.target }} | ||
arch: ${{ github.event.inputs.arch }} | ||
profile: Galaxy Nexus | ||
emulator-options: ${{ github.event.inputs.emulator-options }} | ||
emulator-build: ${{ github.event.inputs.emulator-build }} | ||
channel: ${{ github.event.inputs.channel }} | ||
working-directory: ./test-fixture/ | ||
script: ${{ github.event.inputs.script }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as mapper from '../src/channel-id-mapper'; | ||
|
||
describe('channel id mapper tests', () => { | ||
it('Throws if channelName is unknown', () => { | ||
const func = () => { | ||
mapper.getChannelId('unknown-channel'); | ||
}; | ||
expect(func).toThrowError(`Unexpected channel name: 'unknown-channel'.`); | ||
}); | ||
|
||
it('Returns expected channelId from channelName', () => { | ||
expect(mapper.getChannelId('stable')).toBe(0); | ||
expect(mapper.getChannelId('beta')).toBe(1); | ||
expect(mapper.getChannelId('dev')).toBe(2); | ||
expect(mapper.getChannelId('canary')).toBe(3); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getChannelId = void 0; | ||
function getChannelId(channelName) { | ||
if (channelName === 'stable') { | ||
return 0; | ||
} | ||
else if (channelName === 'beta') { | ||
return 1; | ||
} | ||
else if (channelName === 'dev') { | ||
return 2; | ||
} | ||
else if (channelName === 'canary') { | ||
return 3; | ||
} | ||
else { | ||
throw new Error(`Unexpected channel name: '${channelName}'.`); | ||
} | ||
} | ||
exports.getChannelId = getChannelId; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.