Skip to content

Commit d898d13

Browse files
authored
Merge pull request #215 from brianegan/refresh
Upgrade most samples to Flutter 3.35.2
2 parents 41a033f + d494900 commit d898d13

File tree

2,487 files changed

+54886
-32934
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,487 files changed

+54886
-32934
lines changed

.cirrus.yml

Lines changed: 0 additions & 112 deletions
This file was deleted.

.fvmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"flutter": "3.35.2"
3+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "Validate"
2+
description: "Runs lint, format, and test on an app"
3+
inputs:
4+
working-directory:
5+
description: "Directory to run validation in"
6+
required: true
7+
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: Set up flutter
12+
uses: kuhnroyal/flutter-fvm-config-action/setup@v3
13+
14+
- name: Get dependencies
15+
shell: bash
16+
run: dart pub get
17+
working-directory: ${{ inputs.working-directory }}
18+
19+
- name: Check dart formatting
20+
shell: bash
21+
run: dart format -o none --set-exit-if-changed .
22+
working-directory: ${{ inputs.working-directory }}
23+
24+
- name: Check dart analysis
25+
shell: bash
26+
run: dart analyze --fatal-infos --fatal-warnings .
27+
working-directory: ${{ inputs.working-directory }}
28+
29+
- name: Run unit tests and prepare coverage
30+
shell: bash
31+
run: |
32+
dart pub global activate coverage
33+
dart run test --coverage=coverage
34+
dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib
35+
# Extract directory name for artifact naming
36+
echo "DIR_NAME=$(basename "${{ inputs.working-directory }}")" >> $GITHUB_ENV
37+
working-directory: ${{ inputs.working-directory }}
38+
39+
- name: Upload coverage artifact
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: coverage-lcov-${{ env.DIR_NAME }}
43+
path: ${{ inputs.working-directory }}/coverage/lcov.info
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: "Validate"
2+
description: "Runs lint, format, and test on an app"
3+
inputs:
4+
working-directory:
5+
description: "Directory to run validation in"
6+
required: true
7+
run-integration-tests:
8+
description: "Run integration tests"
9+
required: false
10+
default: "true"
11+
deploy-to-netlify:
12+
description: "Deploy to Netlify"
13+
required: true
14+
default: "false"
15+
netlify-auth-token:
16+
description: "Netlify auth token"
17+
required: true
18+
netlify-site-id:
19+
description: "Netlify site id"
20+
required: true
21+
runs:
22+
using: "composite"
23+
steps:
24+
- name: Set up flutter
25+
uses: kuhnroyal/flutter-fvm-config-action/setup@v3
26+
27+
- name: Get dependencies
28+
shell: bash
29+
run: flutter pub get
30+
working-directory: ${{ inputs.working-directory }}
31+
32+
- name: Check dart formatting
33+
shell: bash
34+
run: dart format -o none --set-exit-if-changed .
35+
working-directory: ${{ inputs.working-directory }}
36+
37+
- name: Check dart analysis
38+
shell: bash
39+
run: dart analyze --fatal-infos --fatal-warnings .
40+
working-directory: ${{ inputs.working-directory }}
41+
42+
- name: Run unit tests and prepare coverage
43+
shell: bash
44+
if: '[ -d "${{ inputs.working-directory }}/test" ]'
45+
run: |
46+
flutter test --coverage
47+
# Extract directory name for artifact naming
48+
echo "DIR_NAME=$(basename "${{ inputs.working-directory }}")" >> $GITHUB_ENV
49+
working-directory: ${{ inputs.working-directory }}
50+
51+
- name: Upload coverage artifact
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: coverage-lcov-${{ env.DIR_NAME }}
55+
path: ${{ inputs.working-directory }}/coverage/lcov.info
56+
57+
- name: Run linux integration tests
58+
if: ${{ inputs.run-integration-tests != 'false' }}
59+
shell: bash
60+
run: |
61+
sudo apt-get update
62+
sudo apt-get install \
63+
clang \
64+
cmake \
65+
git \
66+
ninja-build \
67+
pkg-config \
68+
libgtk-3-dev \
69+
liblzma-dev \
70+
libstdc++-12-dev \
71+
libglu1-mesa \
72+
xvfb
73+
export DISPLAY=:99 # Set display for Xvfb
74+
xvfb-run -a flutter test integration_test/app_test.dart -d linux
75+
working-directory: ${{ inputs.working-directory }}
76+
77+
- name: Build web app
78+
if: ${{ inputs.deploy-to-netlify != 'false' }}
79+
shell: bash
80+
run: |
81+
flutter build web --wasm
82+
working-directory: ${{ inputs.working-directory }}
83+
84+
- name: Deploy to Netlify
85+
if: ${{ inputs.deploy-to-netlify != 'false' }}
86+
uses: nwtgck/actions-netlify@v3.0
87+
with:
88+
publish-dir: ${{ inputs.working-directory }}/build/web
89+
production-deploy: true
90+
deploy-message: "Deploy from GitHub Actions"
91+
env:
92+
NETLIFY_AUTH_TOKEN: ${{ inputs.netlify-auth-token }}
93+
NETLIFY_SITE_ID: ${{ inputs.netlify-site-id }}

0 commit comments

Comments
 (0)