Skip to content
Open
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
3 changes: 1 addition & 2 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ These enable the firebase-functions HTTP endpoint for manifest extraction.
Add to README.md:

```markdown
[![Tests](https://github.com/invertase/firebase-functions-dart/actions/workflows/test.yml/badge.svg)](https://github.com/invertase/firebase-functions-dart/actions/workflows/test.yml)
[![PR Checks](https://github.com/invertase/firebase-functions-dart/actions/workflows/pr-checks.yml/badge.svg)](https://github.com/invertase/firebase-functions-dart/actions/workflows/pr-checks.yml)
[![Tests](https://github.com/firebase/firebase-functions-dart/actions/workflows/test.yml/badge.svg)](https://github.com/firebase/firebase-functions-dart/actions/workflows/test.yml)
```

## Debugging Failed Workflows
Expand Down
51 changes: 26 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ name: Tests

on:
push:
branches: [main, develop]
branches: [main]
pull_request:
branches: [main, develop]
branches: [main]
workflow_dispatch:
schedule:
- cron: "0 0 * * 0" # weekly

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -33,7 +35,7 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98

- name: Download addlicense
run: |
Expand Down Expand Up @@ -66,14 +68,14 @@ jobs:
strategy:
fail-fast: false
matrix:
sdk: [stable, beta]
sdk: [stable, dev]

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98

- name: Setup Dart SDK
uses: dart-lang/setup-dart@v1
uses: dart-lang/setup-dart@cb7127289503113089d94a9c7247ada34feeb436
with:
sdk: ${{ matrix.sdk }}

Expand All @@ -98,21 +100,20 @@ jobs:
done
dart analyze --fatal-infos test/fixtures/dart_reference

# TODO: Re-enable when unit tests are added
# - name: Run unit tests
# run: dart test --exclude-tags=snapshot,integration,e2e
- name: Run unit tests
run: dart test --exclude-tags=snapshot,integration,e2e

# Builder tests - generate and verify functions.yaml
# Builder tests - generate and display functions.yaml
builder-tests:
name: Builder Tests
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98

- name: Setup Dart SDK
uses: dart-lang/setup-dart@v1
uses: dart-lang/setup-dart@cb7127289503113089d94a9c7247ada34feeb436
with:
sdk: stable

Expand Down Expand Up @@ -141,7 +142,7 @@ jobs:
cat test/fixtures/dart_reference/functions.yaml

- name: Upload generated manifest
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
with:
name: dart-manifest
path: test/fixtures/dart_reference/functions.yaml
Expand All @@ -155,15 +156,15 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98

- name: Setup Dart SDK
uses: dart-lang/setup-dart@v1
uses: dart-lang/setup-dart@cb7127289503113089d94a9c7247ada34feeb436
with:
sdk: stable

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
with:
node-version: '20'
cache: 'npm'
Expand All @@ -173,7 +174,7 @@ jobs:
run: dart pub upgrade

- name: Download Dart manifest from builder-tests
uses: actions/download-artifact@v4
uses: actions/download-artifact@484a0b528fb4d7bd804637ccb632e47a0e638317
with:
name: dart-manifest
path: test/fixtures/dart_reference
Expand Down Expand Up @@ -232,7 +233,7 @@ jobs:

- name: Upload manifests on failure
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
with:
name: manifests-comparison
path: |
Expand All @@ -248,28 +249,28 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98

- name: Checkout custom firebase-tools
uses: actions/checkout@v4
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
with:
repository: invertase/firebase-tools
ref: '@invertase/dart'
path: custom-firebase-tools

- name: Setup Dart SDK
uses: dart-lang/setup-dart@v1
uses: dart-lang/setup-dart@cb7127289503113089d94a9c7247ada34feeb436
with:
sdk: stable

- name: Setup Java 21
uses: actions/setup-java@v4
uses: actions/setup-java@1d018f9b8b9b505bb578a83b230fabcce01af93b
with:
distribution: temurin
java-version: '21'

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

Expand All @@ -284,7 +285,7 @@ jobs:
run: dart pub upgrade

- name: Download Dart manifest from builder-tests
uses: actions/download-artifact@v4
uses: actions/download-artifact@484a0b528fb4d7bd804637ccb632e47a0e638317
with:
name: dart-manifest
path: test/fixtures/dart_reference
Expand All @@ -304,7 +305,7 @@ jobs:

- name: Upload test logs on failure
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
with:
name: e2e-test-logs
path: |
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Firebase SDK for Dart Functions

[![Tests](https://github.com/invertase/firebase_functions/actions/workflows/test.yml/badge.svg)](https://github.com/invertase/firebase_functions/actions/workflows/test.yml)
[![PR Checks](https://github.com/invertase/firebase_functions/actions/workflows/test.yml/badge.svg)](https://github.com/invertase/firebase_functions/actions/workflows/pr-checks.yml)
[![Tests](https://github.com/firebase/firebase-functions-dart/actions/workflows/test.yml/badge.svg)](https://github.com/firebase/firebase-functions-dart/actions/workflows/test.yml)
[![pub package](https://img.shields.io/pub/v/firebase_functions.svg)](https://pub.dev/packages/firebase_functions)

Write Firebase Cloud Functions in Dart with full type safety and performance.

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/dart_reference/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ publish_to: none
resolution: workspace

environment:
sdk: ^3.7.0
sdk: ^3.9.0

dependencies:
firebase_functions: any
Expand Down