Skip to content

Commit

Permalink
chore(ci): add setup for env, re-define build job
Browse files Browse the repository at this point in the history
  • Loading branch information
thisissandipp committed Jul 16, 2024
1 parent 226787d commit e2521a0
Showing 1 changed file with 54 additions and 5 deletions.
59 changes: 54 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,63 @@ jobs:
semantic-pull-request:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1

build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable

spell-check:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1
with:
includes: |
**/*.md
modified_files_only: false

build:
defaults:
run:
working-directory: .

runs-on: "ubuntu-latest"

steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4

- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ""
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: 🤫 Set SSH Key
env:
ssh_key: ""
if: env.ssh_key != null
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ""

- name: 📦 Install Dependencies
run: |
flutter pub global activate very_good_cli
very_good packages get --recursive --ignore="!*"
- name: ⚙️ Run Setup
run: |
echo "${{ secrets.ENV_FILE }}" > .env
echo "${{ secrets.ENV_GENERATED_FILE }}" > lib/env/env.g.dart
dart format lib/env/env.g.dart
- name: ✨ Check Formatting
run: dart format --line-length 80 --set-exit-if-changed lib test

- name: 🕵️ Analyze
run: flutter analyze lib test

- name: 🧪 Run Tests
run: very_good test -j 4 --optimization --coverage --test-randomize-ordering-seed random

- name: 📊 Check Code Coverage
uses: VeryGoodOpenSource/very_good_coverage@v3
with:
path: ./coverage/lcov.info
exclude: ""
min_coverage: 100

0 comments on commit e2521a0

Please sign in to comment.