Add some additional header tests (#1006) #447
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:cupertino_http CI | |
on: | |
push: | |
branches: | |
- main | |
- master | |
paths: | |
- 'pkgs/cupertino_http/**' | |
- 'pkgs/http_client_conformance_tests/**' | |
- '.github/workflows/cupertino.yml' | |
pull_request: | |
paths: | |
- 'pkgs/cupertino_http/**' | |
- 'pkgs/http_client_conformance_tests/**' | |
- '.github/workflows/cupertino.yml' | |
schedule: | |
- cron: "0 0 * * 0" | |
env: | |
PUB_ENVIRONMENT: bot.github | |
jobs: | |
analyze: | |
name: Lint and static analysis | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: pkgs/cupertino_http | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- id: install | |
name: Install dependencies | |
run: flutter pub get | |
- name: Check formatting | |
run: dart format --output=none --set-exit-if-changed . | |
if: always() && steps.install.outcome == 'success' | |
- name: Analyze code | |
run: flutter analyze --fatal-infos | |
if: always() && steps.install.outcome == 'success' | |
test: | |
# Test package:cupertino_http use flutter integration tests. | |
needs: analyze | |
name: "Build and test" | |
strategy: | |
matrix: | |
# Test on the minimum supported flutter version and the latest | |
# version. | |
flutter-version: ["3.10.0", "any"] | |
runs-on: macos-latest | |
defaults: | |
run: | |
working-directory: pkgs/cupertino_http/example | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: futureware-tech/simulator-action@v2 | |
with: | |
model: 'iPhone 8' | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
channel: 'stable' | |
- name: Run tests | |
# TODO: Remove the retries when | |
# https://github.com/flutter/flutter/issues/121231 is fixed. | |
# See https://github.com/dart-lang/http/issues/938 for context. | |
run: | | |
for i in {1..6} | |
do | |
flutter test integration_test/main.dart && break | |
if [ $i -eq 6 ] | |
then | |
exit 1 | |
fi | |
echo "Retry $i" | |
done |