Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix flutter minor version in test workflow #255

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 27 additions & 32 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Runs flutter test and CHANGELOG.md validation on every PR to main.
# Failed goldens are uploaded and can be seen in the artifact summary of the job.

name: Validate
name: Test

on:
push:
Expand All @@ -22,22 +22,21 @@ jobs:
runs-on: macos-latest

steps:
- name: Checkout sbb_design_system_mobile code.
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Clone flutter version specified in .fvm.
uses: subosito/flutter-action@v2
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.27.x
cache: true

- name: Run flutter doctor.
- name: Flutter doctor
run: flutter doctor -v

- name: Install dependencies.
- name: Install dependencies
run: flutter pub get

- name: Run flutter test.
- name: Run Flutter test
id: test
run: flutter test

Expand Down Expand Up @@ -70,29 +69,27 @@ jobs:
strategy:
fail-fast: false
matrix:
sdk: ["3.22.3", ""]
sdk: ["3.22.3", "3.27.x"]
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.sdk }}
cache: true

- uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
cache: "gradle"
- run: flutter pub get
- name: Build appbundle.
run: flutter build appbundle --profile --no-pub

- name: Upload appbundle as artifact.
uses: actions/upload-artifact@v4
if: ${{ matrix.sdk == '' && github.event_name == 'pull_request' }}
- uses: subosito/flutter-action@v2
with:
name: app-profile.aab
path: example/build/app/outputs/bundle/profile/
retention-days: 3
channel: stable
flutter-version: ${{ matrix.sdk }}
cache: true

- name: Install dependencies
run: flutter pub get

- name: Build appbundle.
run: flutter build appbundle --profile --no-pub

build-iOS:
name: Build iOS package
Expand All @@ -104,20 +101,18 @@ jobs:
strategy:
fail-fast: false
matrix:
sdk: ["3.22.3", ""]
sdk: ["3.22.3", "3.27.x"]
steps:
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ matrix.sdk }}
cache: true
- run: flutter pub get

- name: Install dependencies
run: flutter pub get

- name: Build iOS package
run: flutter build ios --simulator
- name: Upload Runner.app as artifact
if: ${{ matrix.sdk == '' && github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v4
with:
name: fdsm-example.app
path: example/build/ios/iphonesimulator
retention-days: 3
run: flutter build ios --no-codesign
Loading