FurryChat/.github/workflows/coverage.yml

101 lines
2.6 KiB
YAML
Raw Normal View History

2020-10-06 21:28:48 +00:00
name: Flutter coverage
on:
pull_request:
branches: [ yiffed ]
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2020-10-06 22:07:36 +00:00
- name: Get apt deps
run: |
2020-10-06 22:09:31 +00:00
sudo apt-get update > /dev/null
sudo apt-get -y install --no-install-recommends openssl axel lcov gcc g++ ninja-build
2020-10-06 22:07:36 +00:00
- name: Setup Flutter
2020-10-06 22:12:42 +00:00
uses: subosito/flutter-action@v1.3.2
2020-10-06 22:07:36 +00:00
with:
channel: beta
2020-10-06 21:28:48 +00:00
- name: Check formatting
run: flutter format lib/ test/ test_driver/ --set-exit-if-changed
2020-10-06 22:07:36 +00:00
2020-10-06 21:28:48 +00:00
- name: Analyze code
run: flutter analyze
build-web:
runs-on: ubuntu-latest
needs: analyze
steps:
- uses: actions/checkout@v2
2020-10-06 22:07:36 +00:00
- name: Get apt deps
run: |
2020-10-06 22:09:31 +00:00
sudo apt-get update > /dev/null
sudo apt-get -y install --no-install-recommends openssl axel lcov gcc g++ ninja-build
2020-10-06 22:07:36 +00:00
- name: Setup Flutter
2020-10-06 22:12:42 +00:00
uses: subosito/flutter-action@v1.3.2
2020-10-06 22:07:36 +00:00
with:
channel: beta
2020-10-06 21:28:48 +00:00
- name: Prepare env
run: |
sudo apt update
sudo apt install curl -y
rm -r assets/js/package
cd assets/js/ && curl -L 'https://gitlab.com/famedly/libraries/olm/-/jobs/artifacts/master/download?job=build_js' > olm.zip && cd ../../
cd assets/js/ && unzip olm.zip && cd ../../
cd assets/js/ && rm olm.zip && cd ../../
cd assets/js/ && mv javascript package && cd ../../
cd web/ && rm sql-wasm.js sql-wasm.wasm && cd ../
cd web/ && curl -L 'https://github.com/sql-js/sql.js/releases/latest/download/sqljs-wasm.zip' > sqljs-wasm.zip && cd ../
cd web/ && unzip sqljs-wasm.zip && cd ../
cd web/ && rm sqljs-wasm.zip && cd ../
flutter clean
2020-10-06 22:07:36 +00:00
- name: Configure Flutter
run: flutter config --enable-web && flutter doctor
2020-10-06 21:28:48 +00:00
- run: flutter pub get
2020-10-06 22:07:36 +00:00
2020-10-06 21:28:48 +00:00
- name: Build web release
run: flutter build web --release --verbose
build-android-debug:
runs-on: ubuntu-latest
needs: analyze
steps:
- uses: actions/checkout@v2
2020-10-06 22:07:36 +00:00
- name: Get apt deps
run: |
2020-10-06 22:09:31 +00:00
sudo apt-get update > /dev/null
sudo apt-get -y install --no-install-recommends openssl axel lcov gcc g++ ninja-build
2020-10-06 22:07:36 +00:00
- name: Setup Flutter
2020-10-06 22:12:42 +00:00
uses: subosito/flutter-action@v1.3.2
2020-10-06 22:07:36 +00:00
with:
channel: beta
2020-10-06 21:28:48 +00:00
- name: Get rid of Firebase
run: truncate -s $(head -n -2 android/app/build.gradle | wc -c) android/app/build.gradle
2020-10-06 22:07:36 +00:00
2020-10-06 21:28:48 +00:00
- name: Build debug apk
run: flutter build apk --debug -v
2020-10-06 22:07:36 +00:00
2020-10-06 21:28:48 +00:00
- uses: actions/upload-artifact@v2
with:
name: debug.apk
path: build/app/outputs/apk/debug/app-debug.apk