Skip to content

Commit

Permalink
fix: upgrade .gitlab-ci.yml & flutter_ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
roiskhoiron committed May 27, 2024
1 parent c9cf608 commit f0a5495
Show file tree
Hide file tree
Showing 2 changed files with 176 additions and 1 deletion.
175 changes: 175 additions & 0 deletions .github/workflows/flutter_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,178 @@ jobs:
# want to change this to 'flutter test'.
- name: Run tests
run: flutter test

unit-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# Note: This workflow uses the latest stable version of the Dart SDK.
# You can specify other versions if desired, see documentation here:
# https://github.com/dart-lang/setup-dart/blob/master/README.md
# - uses: dart-lang/setup-dart@v1
# - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: '3.x'

# check flutter version
- name: Check Flutter Version
run: flutter --version

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

# Uncomment this step to verify the use of 'dart format' on each commit.
# - name: Verify formatting
# run: flutter format --set-exit-if-changed

# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: Analyze project source
run: flutter analyze

- run: cd test/unit_test

# Your project will need to have tests in test/ and a dependency on
# package:test for this step to succeed. Note that Flutter projects will
# want to change this to 'flutter test'.
- name: Run unit tests
run: flutter test --coverage

widget-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# Note: This workflow uses the latest stable version of the Dart SDK.
# You can specify other versions if desired, see documentation here:
# https://github.com/dart-lang/setup-dart/blob/master/README.md
# - uses: dart-lang/setup-dart@v1
# - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: '3.x'

# check flutter version
- name: Check Flutter Version
run: flutter --version

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

# Uncomment this step to verify the use of 'dart format' on each commit.
# - name: Verify formatting
# run: flutter format --set-exit-if-changed

# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: Analyze project source
run: flutter analyze

- run: cd test/widget_test
# Your project will need to have tests in test/ and a dependency on
# package:test for this step to succeed. Note that Flutter projects will
# want to change this to 'flutter test'.
- name: Run widget tests
run: flutter test --coverage

integration-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# Note: This workflow uses the latest stable version of the Dart SDK.
# You can specify other versions if desired, see documentation here:
# https://github.com/dart-lang/setup-dart/blob/master/README.md
# - uses: dart-lang/setup-dart@v1
# - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: '3.x'

# check flutter version
- name: Check Flutter Version
run: flutter --version

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

# Uncomment this step to verify the use of 'dart format' on each commit.
# - name: Verify formatting
# run: flutter format --set-exit-if-changed

# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: Analyze project source
run: flutter analyze

- run: cd test

# Your project will need to have tests in test/ and a dependency on
# package:test for this step to succeed. Note that Flutter projects will
# want to change this to 'flutter test'.
- name: Run integration tests
run: flutter test --coverage integration_test

golden-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# Note: This workflow uses the latest stable version of the Dart SDK.
# You can specify other versions if desired, see documentation here:
# https://github.com/dart-lang/setup-dart/blob/master/README.md
# - uses: dart-lang/setup-dart@v1
# - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: '3.x'

# check flutter version
- name: Check Flutter Version
run: flutter --version

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

# Uncomment this step to verify the use of 'dart format' on each commit.
# - name: Verify formatting
# run: flutter format --set-exit-if-changed

# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: Analyze project source
run: flutter analyze

# Your project will need to have tests in test/ and a dependency on
# package:test for this step to succeed. Note that Flutter projects will
# want to change this to 'flutter test'.
- name: Run golden tests
run: flutter test --coverage --update-goldens test/golden_test


2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ widget-test:
stage: widget_test
script:
- cd test/widget_test
- flutter test --coverage test/widget_test
- flutter test --coverage

integration-test:
stage: integration_test
Expand Down

0 comments on commit f0a5495

Please sign in to comment.