name: "All the sdk specific jobs" on: workflow_call: jobs: e2ee_test: runs-on: ubuntu-latest strategy: matrix: homeserver: [synapse, dendrite, conduit] # since the dendrite job is optional, actually run all tests to the end instead of failing on first error. fail-fast: false steps: - uses: actions/checkout@v3 - run: cat .github/workflows/versions.env >> $GITHUB_ENV - name: Run tests run: | export NETWORK='--network mynet' docker network create mynet # deploy homeserver instance scripts/integration-server-${{matrix.homeserver}}.sh docker run $NETWORK --env GITHUB_ACTIONS="${GITHUB_ACTIONS}" --env HOMESERVER_IMPLEMENTATION="${{matrix.homeserver}}" --env HOMESERVER="${{startsWith('dendrite', matrix.homeserver) && format('{0}:8008', matrix.homeserver) || matrix.homeserver }}" --volume="$(pwd):/workdir" --workdir /workdir ghcr.io/famedly/container-image-flutter/flutter:${{env.flutter_version}} /bin/bash -c "set -e scripts/integration-prepare-alpine.sh # create test user environment variables source scripts/integration-create-environment-variables.sh # properly set the homeserver IP and create test users scripts/integration-prepare-homeserver.sh # setup OLM scripts/prepare.sh scripts/test_driver.sh" # coverage is done on the flutter-linux image because we setup olm there # coverage_without_olm is done on dart images because why not :D coverage: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - run: cat .github/workflows/versions.env >> $GITHUB_ENV - uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa with: flutter-version: ${{ env.flutter_version }} cache: true - name: Run tests run: | sed -i 's/#flutter_test/flutter_test/g' pubspec.yaml rm -r example ./scripts/prepare.sh ./scripts/test.sh coverage_without_olm: runs-on: ubuntu-latest env: NO_OLM: 1 steps: - uses: actions/checkout@v3 - run: cat .github/workflows/versions.env >> $GITHUB_ENV - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ env.dart_version }} - name: Run tests run: | apt-get update && apt-get install --no-install-recommends --no-install-suggests -y curl lcov python3 python3-distutils libsqlite3-dev curl -o /bin/lcov_cobertura.py https://raw.githubusercontent.com/eriwen/lcov-to-cobertura-xml/master/lcov_cobertura/lcov_cobertura.py && sed 's/env python/env python3/' -i /bin/lcov_cobertura.py && chmod +x /bin/lcov_cobertura.py dart pub get ./scripts/test.sh pub-dev-dry-run: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - run: cat .github/workflows/versions.env >> $GITHUB_ENV - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ env.dart_version }} - name: pub.dev publish dry run run: | dart pub get dart pub publish --dry-run