11name : Lint Checks
22
3+ # Always run the checks on a push and a PR.
4+ #
5+ # 20250914 gjw Run the tests as separate jobs so we see the individual
6+ # results. We can instead run then as a single job with multiple
7+ # steps, but then it stops on the first fail and so not as
8+ # informative.
9+
310on :
411 push :
512 pull_request :
613 types : [opened, reopened, synchronize]
714
815env :
9- FLUTTER_VERSION : ' 3.38.9 '
16+ FLUTTER_VERSION : ' 3.41.5 '
1017
1118jobs :
1219
@@ -82,26 +89,41 @@ jobs:
8289 with :
8390 node-version : 18
8491 - run : npm install -g markdownlint-cli
85- - run : markdownlint *.md lib assets
92+ - run : markdownlint *.md lib assets installers
8693
8794 link_checker :
8895 runs-on : ubuntu-latest
8996 if : github.event.repository.private == false
9097 permissions :
91- issues : write
98+ issues : write # required for peter-evans/create-issue-from-file
9299 steps :
93100 - uses : actions/checkout@v4
94101
95102 - name : Link Checker
96103 id : lychee
97104 uses : lycheeverse/lychee-action@v2
98- with :
105+ with : # Don't fail for now but then create an issue - useful?
99106 args :
107+ --exclude-file .lycheeignore
100108 --no-progress
101109 ' *.md'
102110 ' ./**/*.dart'
111+ ' assets/**/*.md'
112+ ' assets/**/*.html'
103113 fail : true
104114
115+ # 20251030 gjw Remove the automatic creation of an issue for
116+ # now. It is creating too many and I am simply closing them. The
117+ # failure of the lint test itself should be enough.
118+
119+ # - name: Create Issue From File
120+ # if: steps.lychee.outputs.exit_code != 0
121+ # uses: peter-evans/create-issue-from-file@v5
122+ # with:
123+ # title: Link Checker Report
124+ # content-filepath: ./lychee/out.md
125+ # labels: report, automated issue
126+
105127 locmax :
106128 runs-on : ubuntu-latest
107129 if : github.event.repository.private == false
@@ -116,6 +138,7 @@ jobs:
116138 - uses : actions/checkout@v4
117139 - name : Check copyright headers
118140 run : |
141+ # Find Dart files without proper copyright headers, excluding generated files
119142 missing_copyright=$(find lib -type f -name '*.dart' \
120143 ! -name '*.g.dart' \
121144 ! -name '*.gr.dart' \
@@ -125,9 +148,50 @@ jobs:
125148 ! -name '*.config.dart' \
126149 -exec grep -L "Copyright" {} \;)
127150 if [ -n "$missing_copyright" ]; then
128- echo "Files missing copyright headers:"
151+ echo "❌ Files missing copyright headers:"
129152 echo "$missing_copyright"
153+ echo ""
154+ echo "💡 Note: Generated files (*.g.dart, *.freezed.dart, etc.) are automatically excluded"
155+ exit 1
156+ else
157+ echo "✅ All non-generated Dart files have copyright headers"
158+ fi
159+
160+ # 20251017 gjw The usual command for running the integration tests
161+ # is `flutter test interaction_test` and each `*_test.dart` is
162+ # run. However for our testing of apps using solidui we need to
163+ # authenticate through an external browser login. The usual `flutter
164+ # test` will not properly authenticate. Instead, we should run `make
165+ # qtest.all` to run the tests. This action
166+
167+ test_enforcement :
168+ runs-on : ubuntu-latest
169+ if : github.event.repository.private == false
170+ steps :
171+ - uses : actions/checkout@v4
172+ - name : Check for batch test commands
173+ run : |
174+ # Check for disallowed "flutter test integration_test/" usage in scripts/workflows
175+ # Exclude comments and this CI check itself
176+ batch_test_found=$(grep -r "flutter test integration_test" \
177+ .github/workflows/ \
178+ support/ \
179+ scripts/ \
180+ Makefile 2>/dev/null | \
181+ grep -v "# Check for disallowed" | \
182+ grep -v "batch_test_found=" | \
183+ grep -v "echo.*flutter test integration_test/" || true)
184+ if [ -n "$batch_test_found" ]; then
185+ echo "❌ Found disallowed batch test command 'flutter test integration_test/'"
186+ echo ""
187+ echo "Found in:"
188+ echo "$batch_test_found"
189+ echo ""
190+ echo "⚠️ Batch testing fails on desktop due to Flutter framework limitations."
191+ echo "✅ Use 'make qtest' instead - it runs tests individually."
192+ echo ""
193+ echo "See docs/TESTING_GUIDE.md for details."
130194 exit 1
131195 else
132- echo "All non-generated Dart files have copyright headers "
196+ echo "✅ No batch test commands found - using recommended 'make qtest' approach "
133197 fi
0 commit comments