Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Merge 1.94

Merge 1.94 #429

Workflow file for this run

name: Beep
on:
push:
branches: ["beeper", "beeper-*"]
pull_request:
jobs:
lint-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install poetry
- run: poetry install
- run: poetry run isort --check synapse
- run: poetry run black --check synapse
lint-types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install poetry
- run: poetry install --extras all
- run: poetry run mypy
# Tests
test-trial:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install poetry
- run: poetry install --extras all
- run: poetry run trial -j4 tests
test-sytest:
runs-on: ubuntu-latest
container:
image: matrixdotorg/sytest-synapse:focal
volumes:
- ${{ github.workspace }}:/src
env:
SYTEST_BRANCH: 845764081c890180e3842f135f87e0aa778557a6
TOP: ${{ github.workspace }}
POSTGRES: 1
MULTI_POSTGRES: 1
WOKRERS: 1
steps:
- uses: actions/checkout@v2
- name: Run SyTest
run: /bootstrap.sh synapse
working-directory: /src
- name: Summarise results.tap
if: ${{ always() }}
run: /sytest/scripts/tap_to_gha.pl /logs/results.tap
- name: Upload SyTest logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: Sytest Logs - ${{ job.status }} - (${{ join(matrix.*, ', ') }})
path: |
/logs/results.tap
/logs/**/*.log*
test-complement:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: matrix-org/complement
path: complement
ref: 73ee61e2c249f38a777218bc96454a6655f3b3aa
- name: Install complement dependencies
run: |-
sudo apt-get -qq update
sudo apt-get install -qqy libolm3 libolm-dev
go install -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
- name: Run Complement
run: ./scripts-dev/complement.sh
env:
COMPLEMENT_DIR: complement
# Builds
build-python:
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
with:
# TEMPORARY, see: https://github.com/docker/build-push-action/issues/761
driver-opts: |
image=moby/buildkit:v0.10.6
- uses: docker/login-action@v2
with:
registry: ${{ secrets.CI_REGISTRY }}
username: ${{ secrets.CI_REGISTRY_USER }}
password: ${{ secrets.CI_REGISTRY_PASSWORD }}
- run: |-
if [ "${{ github.ref_name }}" = "beeper" ]; then
tag=$(cat pyproject.toml | grep -E "^version =" | sed -E 's/^version = "(.+)"$/\1/')
else
tag="${{ github.head_ref || github.ref_name }}"
fi
docker buildx build \
--push \
--platform linux/amd64 \
--tag ${{ secrets.CI_REGISTRY }}/synapse:$tag-${{ github.sha }} \
-f docker/Dockerfile \
.
if [ "${{ github.ref_name }}" = "beeper" ]; then
docker pull ${{ secrets.CI_REGISTRY }}/synapse:$tag-${{ github.sha }}
docker tag \
${{ secrets.CI_REGISTRY }}/synapse:$tag-${{ github.sha }} \
${{ secrets.CI_REGISTRY }}/synapse:latest
docker push ${{ secrets.CI_REGISTRY }}/synapse:latest
fi
# Ensure the image works properly
docker run \
--entrypoint '' \
${{ secrets.CI_REGISTRY }}/synapse:$tag-${{ github.sha }} \
python -m synapse.app.homeserver --help
echo "Pushed image: synapse:$tag-${{ github.sha }}"
if [ "${{ github.ref_name }}" = "beeper" ]; then
echo "Pushed image: synapse:latest"
fi