package:google_generative_ai #345
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: package:google_generative_ai | |
permissions: read-all | |
on: | |
pull_request: | |
branches: [ main ] | |
paths: | |
- '.github/workflows/google_generative_ai.yml' | |
- 'pkgs/google_generative_ai/**' | |
push: | |
branches: [ main ] | |
paths: | |
- '.github/workflows/google_generative_ai.yml' | |
- 'pkgs/google_generative_ai/**' | |
schedule: | |
- cron: '0 0 * * 0' # weekly | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: pkgs/google_generative_ai | |
strategy: | |
fail-fast: false | |
matrix: | |
sdk: ['3.1', stable, dev] | |
include: | |
- sdk: stable | |
run-tests: true | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 | |
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 | |
with: | |
sdk: ${{ matrix.sdk }} | |
- run: dart pub get | |
- run: dart analyze --fatal-infos | |
# Make sure that the package version in lib/src/version.dart is kept up-to-date. | |
- run: dart tool/validate_version.dart | |
- run: dart format --output=none --set-exit-if-changed . | |
if: ${{matrix.run-tests}} | |
- run: dart test | |
if: ${{matrix.run-tests}} | |
- run: dart test --platform chrome | |
if: ${{matrix.run-tests}} |