name: Flutter coverage on: push: branches: [ yiffed ] pull_request: branches: [ yiffed ] jobs: analyze: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Get apt deps run: | apt-get update > /dev/null apt-get -y install --no-install-recommends openssl axel lcov gcc g++ ninja-build - name: Setup Flutter uses: takuyaohashi/setup-flutter@v1 with: channel: beta - 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 needs: analyze steps: - uses: actions/checkout@v2 - name: Get apt deps run: | apt-get update > /dev/null apt-get -y install --no-install-recommends openssl axel lcov gcc g++ ninja-build - name: Setup Flutter uses: takuyaohashi/setup-flutter@v1 with: channel: beta - 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 - name: Configure Flutter run: flutter config --enable-web && flutter doctor - run: flutter pub get - name: Build web release run: flutter build web --release --verbose build-android-debug: runs-on: ubuntu-latest needs: analyze steps: - uses: actions/checkout@v2 - name: Get apt deps run: | apt-get update > /dev/null apt-get -y install --no-install-recommends openssl axel lcov gcc g++ ninja-build - name: Setup Flutter uses: takuyaohashi/setup-flutter@v1 with: channel: beta - 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