fix: Fix print message for database exceptions. (#3095) #574
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: Serverpod CI | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
- tests | |
- stable-* | |
pull_request: | |
branches: | |
- main | |
- dev | |
- stable-* | |
jobs: | |
dart_format: | |
name: dart format | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dart-version: ['3.3.0'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dart-lang/setup-dart@v1.3 | |
with: | |
sdk: ${{ matrix.dart-version }} | |
- name: Verify formatting | |
run: dart format --output=none --set-exit-if-changed . | |
dart_analyze: | |
name: dart analyze | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
flutter-version: ['3.19.0'] | |
os: [windows-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Install melos | |
run: dart pub global activate melos | |
- name: Bootstrap | |
run: melos bootstrap | |
- name: Run lint | |
run: melos lint_strict | |
dart_analyze_latest: | |
name: dart analyze latest | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
flutter-version: ['3.27.0'] | |
os: [windows-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Install melos | |
run: dart pub global activate melos | |
- name: Bootstrap | |
run: melos bootstrap | |
- name: Run lint | |
run: melos lint | |
dart_analyze_downgrade: | |
name: dart analyze downgrade | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
flutter-version: ['3.19.0', '3.27.0'] | |
os: [windows-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Install melos | |
run: dart pub global activate melos | |
- name: Bootstrap | |
run: melos bootstrap | |
- name: Downgrade dependencies | |
run: melos downgrade | |
- name: Run lint | |
run: melos lint_loose | |
serverpod_generate: | |
name: serverpod generate | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
flutter-version: ['3.19.0', '3.27.0'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Install dependencies | |
run: bash util/pub_get_all | |
- name: Run serverpod generate | |
run: bash util/run_tests_serverpod_generate | |
update_pubspecs: | |
name: update pubspecs | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
flutter-version: ['3.19.0', '3.27.0'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Run serverpod update pubspecs | |
run: bash util/run_tests_update_pubspecs | |
unit_io_tests: | |
name: Unit tests IO | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
flutter-version: ['3.19.0', '3.27.0'] | |
os: [windows-latest, ubuntu-latest] | |
path: | |
[ | |
'tools/serverpod_cli', | |
'packages/serverpod', | |
'packages/serverpod_client', | |
'packages/serverpod_shared', | |
'packages/serverpod_serialization', | |
'tests/serverpod_test_client', | |
'tests/serverpod_test_server', | |
'modules/serverpod_auth/serverpod_auth_server', | |
] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Run unit tests | |
run: dart test | |
working-directory: ${{ matrix.path }} | |
unit_web_tests: | |
name: Unit tests Web | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
flutter-version: ['3.19.0', '3.27.0'] | |
os: [ubuntu-latest] | |
path: ['packages/serverpod_client'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- uses: browser-actions/setup-chrome@v1 | |
- name: Run unit tests | |
run: dart test -p chrome | |
working-directory: ${{ matrix.path }} | |
e2e_io_tests: | |
name: Serverpod E2E IO tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
flutter-version: ['3.19.0', '3.27.0'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Run e2e tests | |
run: util/run_tests_e2e | |
e2e_web_tests: | |
name: Serverpod E2E web tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
flutter-version: ['3.19.0', '3.27.0'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Run e2e tests | |
run: util/run_tests_e2e firefox | |
integration_tests: | |
name: Serverpod integration tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
flutter-version: ['3.19.0', '3.27.0'] | |
path: ['packages/serverpod_shared'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Run integration tests | |
run: dart test test_integration | |
working-directory: ${{ matrix.path }} | |
integration_test_server: | |
name: Serverpod integration tests (server) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
flutter-version: ['3.19.0', '3.27.0'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Run integration tests | |
run: util/run_tests_integration | |
integration_test_server_concurrent: | |
name: Serverpod concurrent integration tests (server) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
flutter-version: ['3.19.0', '3.27.0'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Run integration tests | |
run: util/run_tests_integration_concurrently | |
bootstrap_tests: | |
name: Bootstrap tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
flutter-version: ['3.19.0', '3.27.0'] | |
os: [windows-latest, ubuntu-latest] | |
path: ['tests/bootstrap_project'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Setup docker (missing on MacOS) | |
if: runner.os == 'macos' | |
run: | | |
brew install docker docker-compose | |
# Link the Docker Compose v2 plugin so it's understood by the docker CLI | |
mkdir -p ~/.docker/cli-plugins | |
ln -sfn /usr/local/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose | |
colima start | |
- name: Run unit tests | |
run: dart test --concurrency=1 | |
working-directory: ${{ matrix.path }} | |
migration_e2e_tests: | |
name: Migration e2e tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
flutter-version: ['3.19.0', '3.27.0'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Run e2e migration tests | |
run: util/run_tests_migrations_e2e | |
cli_e2e_tests: | |
name: CLI e2e tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
flutter-version: ['3.19.0', '3.27.0'] | |
os: [ubuntu-latest] | |
path: ['tests/serverpod_cli_e2e_test'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Setup docker (missing on MacOS) | |
if: runner.os == 'macos' | |
run: | | |
brew install docker docker-compose | |
# Link the Docker Compose v2 plugin so it's understood by the docker CLI | |
mkdir -p ~/.docker/cli-plugins | |
ln -sfn /usr/local/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose | |
colima start | |
- name: Run unit tests | |
run: dart test --concurrency=1 | |
working-directory: ${{ matrix.path }} | |
integration_test_flutter: | |
name: Serverpod integration tests (flutter) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run integration tests in Docker | |
run: util/run_tests_flutter_integration |