diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml new file mode 100644 index 000000000..d6b6002c1 --- /dev/null +++ b/.github/workflows/app.yml @@ -0,0 +1,42 @@ +name: "All the sdk specific jobs" + +on: + workflow_call: + inputs: + flutter_version: + description: "The flutter version used for tests and builds" + type: string + required: true + dart_version: + description: "The dart version used for tests and builds" + type: string + required: true + +jobs: + e2ee_test: + runs-on: ubuntu-latest + env: + HOMESERVER: matrix + HOMESERVER_IMPLEMENTATION: synapse + BASEDIR: /home/runner/work/matrix-dart-sdk + container: + image: ghcr.io/famedly/container-image-flutter/flutter:${{inputs.flutter_version}} + volumes: + - /var/run/docker.sock:/var/run/docker.sock + steps: + - uses: actions/checkout@v3 + - name: Run tests + run: | + export NETWORK='--network ${{ job.container.network }}' + scripts/integration-prepare-alpine.sh + # deploy homeserver instance + scripts/integration-server-synapse.sh + ip a s + export HOMESERVER="$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' synapse)" + # 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 diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml new file mode 100644 index 000000000..92a7abd11 --- /dev/null +++ b/.github/workflows/issue-triage.yml @@ -0,0 +1,18 @@ +name: Add issues to Product Management Project. + +on: + issues: + types: + - opened + +jobs: + add-to-project: + name: Add issue to project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.5.0 + with: + # You can target a repository in a different organization + # to the issue + project-url: https://github.com/orgs/famedly/projects/4 + github-token: ${{ secrets.ADD_ISSUE_TO_PROJECT_PAT }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 92a7abd11..173a43cf4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,18 +1,35 @@ -name: Add issues to Product Management Project. +name: CI on: - issues: - types: - - opened + push: + branches: + - main + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true jobs: - add-to-project: - name: Add issue to project - runs-on: ubuntu-latest - steps: - - uses: actions/add-to-project@v0.5.0 - with: - # You can target a repository in a different organization - # to the issue - project-url: https://github.com/orgs/famedly/projects/4 - github-token: ${{ secrets.ADD_ISSUE_TO_PROJECT_PAT }} + dart: + permissions: + contents: read + uses: famedly/frontend-ci-templates/.github/workflows/dart.yml@main + with: + flutter_version: 3.10.4 + dart_version: 3.0.0 + secrets: + ssh_key: "${{ secrets.CI_SSH_PRIVATE_KEY }}" + + general: + permissions: + contents: read + uses: famedly/frontend-ci-templates/.github/workflows/general.yml@main + + app_jobs: + secrets: inherit + uses: ./.github/workflows/app.yml + with: + flutter_version: 3.10.4 + dart_version: 3.0.3 diff --git a/scripts/integration-server-synapse.sh b/scripts/integration-server-synapse.sh index c16804f1f..f4762e0cd 100755 --- a/scripts/integration-server-synapse.sh +++ b/scripts/integration-server-synapse.sh @@ -1,5 +1,9 @@ #!/usr/bin/env bash -docker run -d --name synapse --tmpfs /data \ - --volume="$(pwd)/test_driver/synapse/data/homeserver.yaml":/data/homeserver.yaml:rw \ - --volume="$(pwd)/test_driver/synapse/data/localhost.log.config":/data/localhost.log.config:rw \ + +ls -la $(pwd)/test_driver/synapse/data/homeserver.yaml +docker run -d --name synapse --tmpfs /data $NETWORK --hostname matrix \ + --volume="${BASEDIR}/test_driver/synapse/data/homeserver.yaml":/data/homeserver.yaml:rw \ + --volume="${BASEDIR}/test_driver/synapse/data/localhost.log.config":/data/localhost.log.config:rw \ -p 80:80 matrixdotorg/synapse:latest + +docker inspect synapse