Bump actions/setup-java from 3.10.0 to 4.0.0 #39
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
unit-test: | |
name: Unit tests on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
# Set up Flutter. | |
- name: Clone Flutter repository with master channel | |
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d | |
with: | |
channel: master | |
- run: flutter doctor -v | |
# Checkout gallery code and get packages. | |
- name: Checkout gallery code | |
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c | |
- run: flutter pub get | |
# Analyze, check formatting, and run unit tests. | |
- run: flutter analyze | |
- name: Ensure the Dart code is formatted correctly | |
run: flutter format --set-exit-if-changed --dry-run . | |
- name: Run Flutter unit tests | |
run: flutter test | |
benchmark-test: | |
name: Benchmark tests | |
runs-on: ubuntu-latest | |
steps: | |
# Set up Flutter. | |
- name: Clone Flutter repository with master channel | |
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d | |
with: | |
channel: master | |
- run: flutter doctor -v | |
- run: flutter config --enable-web | |
# Checkout gallery code and get packages. | |
- name: Checkout gallery code | |
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c | |
- run: flutter pub get | |
- run: flutter test test_benchmarks | |
golden-test: | |
name: Golden tests | |
runs-on: macos-latest | |
steps: | |
# Set up Flutter. | |
- name: Clone Flutter repository with master channel | |
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d | |
with: | |
channel: master | |
- run: flutter doctor -v | |
# Checkout gallery code and get packages. | |
- name: Checkout gallery code | |
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c | |
- run: flutter pub get | |
# Run the golden tests and upload failed test artifacts. | |
- run: flutter test test_goldens | |
- name: Upload goldens if tests fail | |
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce | |
if: failure() | |
with: | |
name: goldens | |
path: test_goldens/failures/ |