Skip to content

Commit 7d6a427

Browse files
committed
Base CICD for PRs
1 parent c5a89b4 commit 7d6a427

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: 'Setup Flutter'
2+
description: 'Reusable action to setup Flutter environment'
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Set up Flutter
8+
uses: subosito/flutter-action@v2
9+
with:
10+
flutter-version: '3.32.6' # Set the desired Flutter version
11+
12+
- name: Install dependencies
13+
run: flutter pub get
14+
shell: bash
15+
16+
- name: Generate files
17+
run: dart run build_runner build --delete-conflicting-outputs
18+
shell: bash

.github/workflows/pr.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Flutter
17+
uses: ./.github/actions/setup-flutter
18+
19+
- name: Generate Resources
20+
run: flutter gen-l10n
21+
22+
- name: Run tests
23+
run: flutter test
24+
25+
- name: Analyze
26+
run: dart analyze

0 commit comments

Comments
 (0)