From 448a3aa1bc8e8d0cc921acd5b9850f4da5354658 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Fri, 18 Aug 2023 14:53:23 +0100 Subject: [PATCH] Test CI config WIP --- .github/workflows/dmr-test-ci.yml | 76 +++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/dmr-test-ci.yml diff --git a/.github/workflows/dmr-test-ci.yml b/.github/workflows/dmr-test-ci.yml new file mode 100644 index 00000000..e6fa30bb --- /dev/null +++ b/.github/workflows/dmr-test-ci.yml @@ -0,0 +1,76 @@ +name: DMR test CI config + +on: + push: + branches: ["dmr/oidc-in-ci"] + +permissions: + packages: read + +jobs: + end_to_end: + runs-on: ubuntu-latest + services: + postgres: + image: postgres:13-alpine + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: syncv3 + ports: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: + - uses: actions/checkout@v3 + + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version: 1.19 + + - name: Build + run: go build ./cmd/syncv3 + + - name: Set up gotestfmt + uses: GoTestTools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Declare Python dependencies + run: echo "matrix-synapse==1.90.0" > /tmp/requirements.txt + + - name: Install Python and Synapse + uses: actions/setup-python@v4 + with: + python-version: 3.11 + cache: 'pip' + cache-dependency-path: '/tmp/requirements.txt' + + - run: pip list + +# - name: Run end-to-end tests +# run: | +# set -euo pipefail +# ./run-tests.sh -count=1 -v -json . 2>&1 | tee test-e2e-runner.log | gotestfmt -hide all +# working-directory: tests-e2e +# shell: bash +# env: +# SYNCV3_DB: user=postgres dbname=syncv3 sslmode=disable password=postgres host=localhost +# SYNCV3_SERVER: http://localhost:8008 +# SYNCV3_SECRET: itsasecret +# SYNCV3_MAX_DB_CONN: ${{ matrix.max_db_conns }} +# E2E_TEST_SERVER_STDOUT: test-e2e-server.log +# +# - name: Upload test log +# uses: actions/upload-artifact@v3 +# if: always() +# with: +# name: E2E test logs +# path: | +# ./tests-e2e/test-e2e-runner.log +# ./tests-e2e/test-e2e-server.log +# if-no-files-found: error \ No newline at end of file