1
0
mirror of https://github.com/flutter/samples.git synced 2026-03-22 20:31:48 +00:00
Files
samples/.github/workflows/main.yml
Brett Morgan e97ba0b50a Add a CI check for web/samples_index (#1827)
fixes: https://github.com/flutter/samples/issues/1825

Note: the added check is expected to fail until
https://github.com/flutter/samples/pull/1826 is landed

## Pre-launch Checklist

- [x] I read the [Flutter Style Guide] _recently_, and have followed its
advice.
- [x] I signed the [CLA].
- [x] I read the [Contributors Guide].
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-devrel
channel on [Discord].

<!-- Links -->
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[CLA]: https://cla.developers.google.com/
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Contributors Guide]:
https://github.com/flutter/samples/blob/main/CONTRIBUTING.md

---------

Co-authored-by: Parker Lougheed <parlough@gmail.com>
2023-05-19 11:30:22 +10:00

75 lines
2.3 KiB
YAML

name: Main Branch CI
# Declare default permissions as read only.
permissions: read-all
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # Every day at midnight
defaults:
run:
shell: bash
jobs:
flutter-tests:
name: Test Flutter ${{ matrix.flutter_version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: github.repository == 'flutter/samples'
strategy:
fail-fast: false
matrix:
flutter_version: [stable, beta, master]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: ${{ matrix.flutter_version }}
- run: ./tool/flutter_ci_script_${{ matrix.flutter_version }}.sh
web-samples-index:
name: web/samples_index config check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
- run: |
dart pub get
dart run grinder generate
working-directory: web/samples_index
android-build:
runs-on: ubuntu-latest
if: github.repository == 'flutter/samples'
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- run: ./tool/android_ci_script.sh
ios-build:
runs-on: macos-latest
if: github.repository == 'flutter/samples'
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- run: ./tool/ios_ci_script.sh