Skip to content

Commit 33279af

Browse files
authored
Merge pull request #1 from CodandoTV/feature/cicd-workflow-prs
Base CICD for PRs
2 parents c5a89b4 + a927403 commit 33279af

2 files changed

Lines changed: 41 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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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: Run tests
20+
run: flutter test
21+
22+
- name: Analyze
23+
run: dart analyze

0 commit comments

Comments
 (0)