matrix-fuzz

git clone git://archive.git.mtrnord.blog/MTRNord/matrix-fuzz.git
Log | Files | Refs | README | LICENSE

test_known.yml (2418B)


      1 name: Test known issues
      2 
      3 on:
      4   workflow_run:
      5     workflows: ["Docker Synapse"]
      6     types:
      7       - completed
      8 
      9 env:
     10   CARGO_TERM_COLOR: always
     11 
     12 jobs:
     13   test:
     14     runs-on: ubuntu-latest
     15     if: ${{ github.event.workflow_run.conclusion == 'success' }}
     16     container: rustlang/rust:nightly-slim
     17 
     18     services:
     19       postgres:
     20         # Docker Hub image
     21         image: postgres
     22         # Provide the password for postgres
     23         env:
     24           POSTGRES_PASSWORD: postgres
     25           POSTGRES_DB: synapse
     26           POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C"
     27         # Set health checks to wait until postgres has started
     28         options: >-
     29           --health-cmd pg_isready
     30           --health-interval 10s
     31           --health-timeout 5s
     32           --health-retries 5
     33       redis:
     34         image: redis
     35         # Set health checks to wait until redis has started
     36         options: >-
     37           --health-cmd "redis-cli ping"
     38           --health-interval 10s
     39           --health-timeout 5s
     40           --health-retries 5
     41       synapse:
     42         image: ghcr.io/mtrnord/matrix-fuzz:synapse
     43         # Set health checks to wait until synapse has started
     44         options: >-
     45           --health-retries 50
     46           --health-interval 30s
     47           --health-timeout 30s
     48 
     49     steps:
     50       - uses: actions/checkout@v3
     51       - name: Install deps
     52         run: |
     53           apt-get update
     54           apt-get install -y python3 jq curl build-essential
     55           apt-get clean
     56       - name: Register get_nonce
     57         id: get_nonce
     58         run: echo "::set-output name=nonce::$(curl http://synapse:8008/_synapse/admin/v1/register | jq -r .nonce)"
     59       - name: Generate mac
     60         id: generate_mac
     61         run: python3 ./dockerfiles/synapse_generate_mac.py
     62         env:
     63           NONCE: ${{ steps.get_nonce.outputs.nonce }}
     64       - name: Register
     65         run: 'curl -X POST http://synapse:8008/_synapse/admin/v1/register -d "{\"mac\": \"${MAC}\", \"nonce\": \"${NONCE}\", \"username\": \"fuzzer\", \"password\": \"Chu8chool0dooqueiwo0lohviegho6ieveuNg3Ohcio2aekaiw0ioF6waifo8eep\"}"'
     66         env:
     67           MAC: ${{ steps.generate_mac.outputs.hmac }}
     68           NONCE: ${{ steps.get_nonce.outputs.nonce }}
     69       - name: Run tests
     70         run: cargo test
     71         env:
     72           MATRIX_SERVER: "http://synapse:8008"
     73           MATRIX_USERNAME: "fuzzer"
     74           MATRIX_PASSWORD: "Chu8chool0dooqueiwo0lohviegho6ieveuNg3Ohcio2aekaiw0ioF6waifo8eep"