Skip to content

Commit

Permalink
support different color formats (henninghall#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
henninghall authored Jul 28, 2020
1 parent 8a11f59 commit 24e228d
Show file tree
Hide file tree
Showing 14 changed files with 2,873 additions and 8,535 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: "Android: build & test"
name: 'Android: End-to-end tests'

on: [push, pull_request]

jobs:
build_and_test:
name: Build & test
end_to_end_tests:
name: End to end tests
runs-on: macos-latest
timeout-minutes: 30
timeout-minutes: 60

steps:
- name: Checkout
Expand All @@ -23,23 +23,25 @@ jobs:
java-version: 'openjdk8'
architecture: 'x64'

- name: Install npm dependencies
working-directory: ./examples/detox
run: |
yarn install --frozen-lockfile
- name: Download Android Emulator Image
timeout-minutes: 15
run: |
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-29;google_apis;x86"
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd --force --name emu --device "Nexus 5X" -k 'system-images;android-29;google_apis;x86'
$ANDROID_HOME/emulator/emulator -list-avds
- name: Install npm dependencies
working-directory: ./examples/detox
run: |
yarn install --frozen-lockfile
- name: Build
working-directory: ./examples/detox
run: |
yarn build:android-ci
- name: Start android emulator
timeout-minutes: 5
working-directory: ./examples/detox
continue-on-error: true
run: |
Expand All @@ -48,11 +50,12 @@ jobs:
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'
$ANDROID_HOME/platform-tools/adb devices
echo "Emulator started"
- name: Run tests
- name: Run e2e tests
timeout-minutes: 30
working-directory: ./examples/detox
run: yarn start & yarn test:android-ci

- name: Upload artifacts
uses: actions/upload-artifact@v1
if: failure()
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/jest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Unit tests'

on: [push, pull_request]

jobs:
unit_tests:
name: Unit tests
runs-on: macos-latest
timeout-minutes: 5

steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1

- name: Node
uses: actions/setup-node@v1

- name: Install npm dependencies
run: |
yarn install --frozen-lockfile
- name: Run unit tests
run: |
yarn test
12 changes: 12 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
],
],
}
4 changes: 2 additions & 2 deletions examples/detox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"start": "react-native start",
"postinstall": "yarn make-example-runnable",
"make-example-runnable": "(cd ../../ && npm i react react-native --no-save)",
"make-example-runnable": "(cd ../../ && npm i react react-native moment --no-save)",
"build:ios": "detox build --configuration ios.debug",
"build:android-debug": "detox build --configuration android.debug",
"build:android-ci": "detox build --configuration android.ci",
Expand Down Expand Up @@ -56,4 +56,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion examples/detox/src/examples/Advanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class Advanced extends Component {
}
/>
<DatePicker
ref={ref => (this.ref = ref)}
innerRef={ref => (this.ref = ref)}
date={this.state.date}
onDateChange={this.setDate}
onDateStringChange={this.setDateString}
Expand Down
Loading

0 comments on commit 24e228d

Please sign in to comment.