Skip to content

[234] Add flutter_secure_storage library #1013

[234] Add flutter_secure_storage library

[234] Add flutter_secure_storage library #1013

Workflow file for this run

name: CI
on:
# Trigger the workflow on push or pull request,
# but push action is only for the feature branch
pull_request:
types: [ opened, synchronize, reopened ]
push:
branches-ignore:
- develop
- 'release/**'
- main
jobs:
test:
name: Template initializing scripts test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out
uses: actions/checkout@v3
- name: Set up Flutter environment
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.10.5'
- name: Generate new project
run: |
dart pub global activate mason_cli
mason get
mason make template -c mason-config.json
# Move the generated project to the root directory for next steps & cleanup to not affect static code analysis
rsync -av --remove-source-files flutter_templates/ ./
rm -rf bricks sample
- name: Get Flutter dependencies
run: flutter pub get
- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Check for any formatting issues in the code
run: dart format --set-exit-if-changed .
- name: Statically analyze the Dart code for any errors
run: flutter analyze .
- name: Run widget tests, unit tests
run: flutter test --machine --coverage
generate_mason_bundle:
# The job generate_mason_bundle identify that the job test must complete successfully
# before this generate_mason_bundle job will run
needs: test
name: Generate Mason bundle
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Set up Flutter environment
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.10.5'
- name: Install Mason CLI
run: |
dart pub global activate mason_cli
mason get
- name: Generate Mason bundle
run: |
mason bundle bricks/permission_handler -t dart -o bricks/template/hooks/bundles
- id: changes
name: Check for changes in the Mason bricks
run: |
count=$(git status bricks --porcelain | wc -l)
echo "count=$count" >> $GITHUB_OUTPUT
- name: Commit & push the Mason bundle changes
if: steps.changes.outputs.count > 0
run: |
git config user.name team-nimblehq
git config user.email [email protected]
git add bricks
git commit -m "[Chore] Generate Mason bundle"
git push