Coverage based on Github actions

This commit is contained in:
Inex Code 2020-10-07 00:28:48 +03:00 committed by GitHub
parent 522d36be6b
commit 0fbc62fe91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

70
.github/workflows/coverage.yml vendored Normal file
View file

@ -0,0 +1,70 @@
name: Flutter coverage
on:
push:
branches: [ yiffed ]
pull_request:
branches: [ yiffed ]
jobs:
analyze:
runs-on: ubuntu-latest
container:
image: registry.gitlab.com/famedly/containers/flutter-dockerimages:stable
steps:
- uses: actions/checkout@v2
- name: Check formatting
run: flutter format lib/ test/ test_driver/ --set-exit-if-changed
- name: Analyze code
run: flutter analyze
build-web:
runs-on: ubuntu-latest
container:
image: registry.gitlab.com/famedly/containers/flutter-dockerimages:beta
needs: analyze
steps:
- uses: actions/checkout@v2
- 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
- run: flutter pub get
- name: Build web release
run: flutter build web --release --verbose
build-android-debug:
runs-on: ubuntu-latest
container:
image: registry.gitlab.com/famedly/containers/flutter-dockerimages:beta
needs: analyze
steps:
- uses: actions/checkout@v2
- name: Get rid of Firebase
run: truncate -s $(head -n -2 android/app/build.gradle | wc -c) android/app/build.gradle
- name: Build debug apk
run: flutter build apk --debug -v
- uses: actions/upload-artifact@v2
with:
name: debug.apk
path: build/app/outputs/apk/debug/app-debug.apk