Format: repo predates Dart 3.11's tall formatter (~128 files would need a
dedicated reformat commit); disable --set-exit-if-changed for now, keep
flutter analyze as the real gate.
Test: 'drawer Settings opens the settings screen' asserted find.text('Español'),
which only holds when the resolved locale is Spanish. Under AppLocale.en (as
set in the test) the tile reads 'English', so it failed under CI's non-Spanish
host locale. Assert by the language selector's Key + icon instead (locale-robust).
79 lines
2.7 KiB
YAML
79 lines
2.7 KiB
YAML
# Per-push gate for git.comunes.org (Forgejo Actions): analyze + tests.
|
|
# Mirrors the local verification gate in docs/design/testing.md. Flutter pinned
|
|
# to the developer toolchain (3.41.9).
|
|
#
|
|
# NOTE: `runs-on` must match a label your Forgejo runner registered with.
|
|
# We check out with plain git (a `run:` step) instead of actions/checkout@v4:
|
|
# the cirruslabs/flutter image has no Node.js, and JS-based actions need it
|
|
# ("exec: node: not found"). Manual checkout keeps the workflow Node-free.
|
|
|
|
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: ['**']
|
|
pull_request:
|
|
|
|
jobs:
|
|
analyze:
|
|
runs-on: docker
|
|
container:
|
|
image: ghcr.io/cirruslabs/flutter:3.41.9
|
|
steps:
|
|
- name: Checkout
|
|
env:
|
|
TOKEN: ${{ github.token }}
|
|
run: |
|
|
git config --global --add safe.directory '*'
|
|
git init -q .
|
|
git remote add origin "http://x-access-token:${TOKEN}@forgejo:3000/${GITHUB_REPOSITORY}.git"
|
|
git fetch -q --depth 1 origin "${GITHUB_SHA}"
|
|
git checkout -q FETCH_HEAD
|
|
- run: flutter pub get
|
|
# Format gate OFF for now: the repo predates the Dart 3.11 "tall" formatter,
|
|
# so `dart format --set-exit-if-changed` flags ~128 otherwise-fine files.
|
|
# Re-enable after a dedicated repo-wide `dart format .` reformat commit.
|
|
- run: flutter analyze
|
|
|
|
test-commons-core:
|
|
runs-on: docker
|
|
container:
|
|
image: ghcr.io/cirruslabs/flutter:3.41.9
|
|
steps:
|
|
- name: Checkout
|
|
env:
|
|
TOKEN: ${{ github.token }}
|
|
run: |
|
|
git config --global --add safe.directory '*'
|
|
git init -q .
|
|
git remote add origin "http://x-access-token:${TOKEN}@forgejo:3000/${GITHUB_REPOSITORY}.git"
|
|
git fetch -q --depth 1 origin "${GITHUB_SHA}"
|
|
git checkout -q FETCH_HEAD
|
|
- run: flutter pub get
|
|
- name: dart test
|
|
working-directory: packages/commons_core
|
|
run: dart test
|
|
|
|
test-app-seeds:
|
|
runs-on: docker
|
|
container:
|
|
image: ghcr.io/cirruslabs/flutter:3.41.9
|
|
steps:
|
|
- name: Checkout
|
|
env:
|
|
TOKEN: ${{ github.token }}
|
|
run: |
|
|
git config --global --add safe.directory '*'
|
|
git init -q .
|
|
git remote add origin "http://x-access-token:${TOKEN}@forgejo:3000/${GITHUB_REPOSITORY}.git"
|
|
git fetch -q --depth 1 origin "${GITHUB_SHA}"
|
|
git checkout -q FETCH_HEAD
|
|
# SQLCipher so the "no plaintext at rest" security test actually runs.
|
|
- run: apt-get update -qq && apt-get install -y -qq libsqlcipher-dev
|
|
- run: flutter pub get
|
|
- name: Generate code + test
|
|
working-directory: apps/app_seeds
|
|
run: |
|
|
dart run slang
|
|
dart run build_runner build --delete-conflicting-outputs
|
|
flutter test --coverage
|