-
-
Notifications
You must be signed in to change notification settings - Fork 7
77 lines (75 loc) · 2.64 KB
/
Copy pathci.yml
File metadata and controls
77 lines (75 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v2
- name: Setup python ${{ matrix.python-version}}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Install test dependencies
run: pip install -U atom enaml tornado msgpack codecov pytest pytest-cov pytest-asyncio
- name: Install cli
run: |
pip install --user git+https://github.com/codelv/enaml-native-cli.git
enaml-native -h
- name: Install enaml-native
run: pip install -e ./
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 11
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Install android system image and emulator
run: |
sdkmanager --list
sdkmanager --install "system-images;android-30;google_apis;x86_64"
sdkmanager --install "emulator"
sdkmanager --install "ndk;23.1.7779620"
- name: Create avd
run: |
echo no | avdmanager create avd --force --name test -k "system-images;android-30;google_apis;x86_64"
avdmanager list avd
- name: Start emulator
run: |
export PATH="$PATH:$ANDROID_HOME/emulator"
emulator -avd test -no-audio -no-window -no-accel &
timeout 300 adb wait-for-device
adb devices
- name: Run tests
run: pytest -v tests --cov enamlnativecli --cov-report xml --asyncio-mode auto
- name: Coverage
run: codecov
check-code:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v2
- name: Setup python ${{ matrix.python-version}}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -U mypy black isort flake8 types-setuptools
- name: Run checks
run: |
isort enamlnativecli --check --diff
isort tests --check --diff
black enamlnativecli/main.py --check --diff
black tests --check --diff
flake8 --ignore=E501 enamlnativecli --per-file-ignores=enamlnativecli/templates/*:E999
flake8 --ignore=E501 tests
mypy enamlnativecli/main.py --ignore-missing-imports