Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
- "docs/**"
- "docs.json"
- ".github/workflows/docs.yml"
# Draft pull requests skip every job. ready_for_review runs CI when the PR is marked ready.
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches: ["main"]
paths:
- "docs/**"
Expand All @@ -20,17 +22,19 @@

jobs:
validate:
# `draft` is null on push, so non-pull_request runs are unchanged.
if: ${{ github.event.pull_request.draft != true }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install docs.page CLI
run: npm install -g @docs.page/cli

- name: Validate documentation
run: npx @docs.page/cli check

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
5 changes: 4 additions & 1 deletion .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
name: Deploy to Firebase Hosting on PR

on:
# Draft pull requests skip every job. ready_for_review runs CI when the PR is marked ready.
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "demo/**"
- "packages/**"
Expand All @@ -19,7 +21,8 @@ permissions:

jobs:
build_and_preview:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
# Same-repository previews only. Draft pull requests skip this job.
if: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.draft != true }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,200 +4,206 @@
workflow_call:
push:
branches: [main]
# Draft pull requests skip every job. ready_for_review runs CI when the PR is marked ready.
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
# `draft` is null on push and on workflow_call from push, so those runs are unchanged.
if: ${{ github.event.pull_request.draft != true }}
runs-on: ubuntu-latest
name: Test
timeout-minutes: 12
steps:
- uses: actions/checkout@v4

- name: Install FVM
shell: bash
run: |
curl -fsSL https://fvm.app/install.sh | bash
echo "/home/runner/fvm/bin" >> "$GITHUB_PATH"

- uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action

- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: stable

- name: Align Melos SDK path
run: |
mkdir -p .fvm
ln -sfn "$FLUTTER_ROOT" .fvm/flutter_sdk

- name: Setup Melos
uses: bluefireteam/melos-action@v3
with:
melos-version: 8.9.0

- name: Install dependencies
run: fvm flutter pub get

- name: Build Runner
run: melos run build_runner:build --no-select
timeout-minutes: 5

# Runs what maintainers run: `dart analyze --fatal-infos` over every
# package, after code generation so generated files exist. DCM is the
# other half of `melos run analyze` and is not run here yet.
- name: Analyze
run: melos run analyze:dart --no-select

- name: Check Contract Schemas
run: melos run contracts:check --no-select

- name: Run Unit Tests
run: melos run test --no-select

- name: Run PDF Plugin Golden Tests
run: |
cd packages/plugins/pdf
fvm flutter test test/goldens/pdf_export_dialog_golden_test.dart

integration-test:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
if: ${{ github.event.pull_request.draft != true }}
runs-on: ubuntu-latest
name: Integration Tests
timeout-minutes: 25
steps:
- uses: actions/checkout@v4

- name: Install Linux Desktop Dependencies
timeout-minutes: 8
run: |
sudo grep -rl 'packages.microsoft.com' /etc/apt/sources.list.d 2>/dev/null | while read -r source_file; do
echo "Removing flaky Microsoft apt source: $source_file"
sudo rm -f "$source_file"
done
sudo apt-get update -o Acquire::Retries=3
sudo apt-get install -y -o Dpkg::Lock::Timeout=60 libgtk-3-dev ninja-build pkg-config

- name: Install FVM
shell: bash
run: |
curl -fsSL https://fvm.app/install.sh | bash
echo "/home/runner/fvm/bin" >> "$GITHUB_PATH"

- uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action

- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: stable

- name: Align Melos SDK path
run: |
mkdir -p .fvm
ln -sfn "$FLUTTER_ROOT" .fvm/flutter_sdk

- name: Setup Melos
uses: bluefireteam/melos-action@v3
with:
melos-version: 8.9.0

- name: Install dependencies
run: fvm flutter pub get

- name: Build Runner
run: melos run build_runner:build --no-select
timeout-minutes: 5

- name: Build SuperDeck Assets
run: |
cd demo
fvm dart run superdeck_cli:main build
timeout-minutes: 5

- name: Run Integration Tests
uses: coactions/setup-xvfb@v1
with:
run: melos run test:integration --no-select
timeout-minutes: 7

web-smoke:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
if: ${{ github.event.pull_request.draft != true }}
runs-on: ubuntu-latest
name: Web Smoke (Playwright)
timeout-minutes: 25
steps:
- uses: actions/checkout@v4

- name: Install FVM
shell: bash
run: |
curl -fsSL https://fvm.app/install.sh | bash
echo "/home/runner/fvm/bin" >> "$GITHUB_PATH"

- uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action

- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: stable

- name: Align Melos SDK path
run: |
mkdir -p .fvm
ln -sfn "$FLUTTER_ROOT" .fvm/flutter_sdk

- name: Setup Melos
uses: bluefireteam/melos-action@v3
with:
melos-version: 8.9.0

- name: Install dependencies
run: fvm flutter pub get

- name: Build Runner
run: melos run build_runner:build --no-select
timeout-minutes: 5

- name: Build SuperDeck Assets
run: |
cd demo
fvm dart run superdeck_cli:main build
timeout-minutes: 5

- name: Build Web App
run: |
cd demo
fvm flutter build web --release
timeout-minutes: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install E2E dependencies
run: |
cd demo/e2e
npm ci

- name: Install Playwright browsers
timeout-minutes: 10
run: |
sudo grep -rl 'packages.microsoft.com' /etc/apt/sources.list.d 2>/dev/null | while read -r source_file; do
echo "Removing flaky Microsoft apt source: $source_file"
sudo rm -f "$source_file"
done
cd demo/e2e
npx playwright install --with-deps chromium webkit

- name: Run Playwright smoke tests
timeout-minutes: 5
run: |
cd demo/e2e
npm run test:smoke

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Loading