Skip to content

Release: elementary-helper 1.0.2 version. #17

Release: elementary-helper 1.0.2 version.

Release: elementary-helper 1.0.2 version. #17

name: elementary helper analysis
on:
pull_request:
branches:
- main
paths:
- "packages/elementary_helper/**"
- ".github/workflows/elementary_helper_analysis.yaml"
push:
branches:
- main
paths:
- "packages/elementary_helper/**"
- ".github/workflows/elementary_helper_analysis.yaml"
jobs:
analysis:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: packages/elementary_helper
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Check Files
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "LICENSE, README.md, example, CHANGELOG.md"
- name: File exists
if: steps.check_files.outputs.files_exists == 'true'
run: echo Content is ok!
- name: Install dependencies
run: flutter pub get
- name: Run dependency validator
run: |
dart pub global activate dependency_validator
dart pub global run dependency_validator:dependency_validator
- name: Run analyzer
run: flutter analyze --fatal-warnings --fatal-infos .
- name: Run formatter
run: dart format --set-exit-if-changed .
- name: Run package analyzer
uses: axel-op/dart-package-analyzer@v3
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
relativePath: packages/elementary_helper/
testing:
needs: analysis
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: packages/elementary_helper
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install dependencies
run: flutter pub get
- name: Run tests
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
if: success()
run: |
flutter test --coverage
bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F elementary_helper
build_android_example:
needs: analysis
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: packages/elementary_helper
steps:
# Setup Java environment in order to build the Android app.
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: "12.x"
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install dependencies
run: flutter pub get
- name: Build Android
run: |
cd example
flutter pub get
flutter build apk
build_ios_example:
needs: analysis
runs-on: macos-latest
defaults:
run:
shell: bash
working-directory: packages/elementary_helper
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install dependencies
run: flutter pub get
- name: Build iOS
run: |
cd example
flutter pub get
flutter build ios --release --no-codesign