147 lines
4.8 KiB
YAML
147 lines
4.8 KiB
YAML
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@v4
|
|
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
|
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
|
|
with:
|
|
sdk: ${{ env.dart_version }}
|
|
- name: Run tests
|
|
run: |
|
|
export HOMESERVER_IMPLEMENTATION=${{matrix.homeserver}}
|
|
export HOMESERVER="localhost:80"
|
|
scripts/integration-server-${{matrix.homeserver}}.sh 2>&1 > /dev/null &
|
|
sudo apt-get update && sudo apt-get install --no-install-recommends --no-install-suggests -y libolm3 libssl3 sqlite3 libsqlite3-dev
|
|
source scripts/integration-create-environment-variables.sh
|
|
scripts/integration-prepare-homeserver.sh
|
|
scripts/prepare.sh
|
|
scripts/test_driver.sh
|
|
|
|
coverage_without_olm:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
NO_OLM: 1
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
|
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
|
|
with:
|
|
sdk: ${{ env.dart_version }}
|
|
- name: Run tests
|
|
run: |
|
|
sudo apt-get update && sudo apt-get install --no-install-recommends --no-install-suggests -y lcov libsqlite3-0 libsqlite3-dev
|
|
./scripts/test.sh
|
|
- uses: actions/upload-artifact@v4
|
|
if: ${{ !cancelled() }}
|
|
with:
|
|
name: coverage_without_olm
|
|
path: coverage_dir/
|
|
retention-days: 1
|
|
|
|
coverage:
|
|
#runs-on: arm-ubuntu-latest-16core
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
|
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
|
|
with:
|
|
sdk: ${{ env.dart_version }}
|
|
#architecture: "arm64"
|
|
- name: Run tests
|
|
run: |
|
|
sudo apt-get update && sudo apt-get install --no-install-recommends --no-install-suggests -y lcov libsqlite3-0 libsqlite3-dev libolm3 libssl3
|
|
./scripts/test.sh
|
|
- uses: actions/upload-artifact@v4
|
|
if: ${{ !cancelled() }}
|
|
with:
|
|
name: coverage
|
|
path: coverage_dir/
|
|
retention-days: 1
|
|
|
|
merge_converage:
|
|
if: ${{ !cancelled() }}
|
|
runs-on: ubuntu-latest
|
|
needs: [coverage, coverage_without_olm]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/download-artifact@v4
|
|
- name: Merge lcov files
|
|
run: |
|
|
sudo apt-get -y install lcov
|
|
lcov -a coverage/lcov.info -a coverage_without_olm/lcov.info -o merged.info
|
|
genhtml merged.info -o merged
|
|
echo $(lcov --summary merged.info | grep 'lines......:') >> $GITHUB_STEP_SUMMARY
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: merged
|
|
path: merged/
|
|
retention-days: 1
|
|
|
|
review_app_coverage:
|
|
if: github.event_name == 'pull_request'
|
|
needs: [merge_converage]
|
|
secrets: inherit
|
|
uses: famedly/frontend-ci-templates/.github/workflows/review-app.yml@main
|
|
with:
|
|
projectname: "matrix-dart-sdk-coverage"
|
|
pr: ${{ github.event.pull_request.number }}
|
|
environment: "review"
|
|
artifact-name: "merged"
|
|
|
|
dart_web_compatible:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
|
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
|
|
with:
|
|
flutter-version: ${{ env.flutter_version }}
|
|
cache: true
|
|
- name: Ensure SDK compiles on web
|
|
run: |
|
|
pushd web_test
|
|
dart pub get
|
|
dart run webdev build
|
|
|
|
database_web_tests:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
NO_OLM: 1
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
|
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
|
|
with:
|
|
sdk: ${{ env.dart_version }}
|
|
- uses: browser-actions/setup-chrome@v1
|
|
- name: Run tests
|
|
run: |
|
|
dart pub get
|
|
dart test test/box_test.dart --platform chrome
|
|
|
|
pub-dev-dry-run:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- 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
|