File: wstest.yml

package info (click to toggle)
python-autobahn 24.4.2%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,468 kB
  • sloc: python: 38,615; javascript: 2,705; makefile: 904; ansic: 373; sh: 64
file content (92 lines) | stat: -rw-r--r-- 2,995 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# runs autobahn testsuite and uploads to
# https://crossbario.com/reports/autobahn-testsuite-2021-03-17/clients/index.html

name: wstest

on:
  # Trigger this workflow when the "deploy" workflow has completed successfully
  # https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_run
  workflow_run:
    workflows:
      - deploy
    branches:
      - master
    types:
      - completed

jobs:

  # runs on x86-64 (xeon-d) host: matterhorn
  wstest_amd64:

    if: github.ref == 'refs/heads/master'

    runs-on: [self-hosted, linux, X64]

    strategy:
      matrix:
        python-version: ['3.9', 'pypy-3.7']

    env:
      AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
      AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}

    steps:
    # Checkout sources
    - uses: actions/checkout@v2

    # Use this Python
    # https://github.com/actions/setup-python/blob/main/README.md
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}

    - name: Install Python package dependencies
      run: |
        curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py
        python3 get-pip.py "pip<20"
        pip3 show pip
        pip3 install -r requirements-dev.txt

    - name: Set environment
      run: |
        echo AUTOBAHN_BUILD_DATE=`date -u +"%Y-%m-%d"` >> $GITHUB_ENV
        echo AUTOBAHN_BUILD_ID=$(date --utc +%Y%m%d)-$(git rev-parse --short ${GITHUB_SHA}) >> $GITHUB_ENV
        echo AUTOBAHN_VCS_REF=`git rev-parse --short ${GITHUB_SHA}` >> $GITHUB_ENV
        echo AUTOBAHN_VERSION=$(grep -E '^(__version__)' ./autobahn/_version.py | cut -d ' ' -f3 | sed -e 's|[u"'\'']||g') >> $GITHUB_ENV

    - name: Print environment
      run: |
        echo ""
        echo "Build environment configured:"
        echo ""
        echo "  AUTOBAHN_BUILD_DATE = ${AUTOBAHN_BUILD_DATE}"
        echo "  AUTOBAHN_BUILD_ID   = ${AUTOBAHN_BUILD_ID}"
        echo "  AUTOBAHN_VCS_REF    = ${AUTOBAHN_VCS_REF}"
        echo "  AUTOBAHN_VERSION    = ${AUTOBAHN_VERSION}"
        echo ""
        echo "  AWS_DEFAULT_REGION  = ${AWS_DEFAULT_REGION}"
        echo "  AWS_S3_BUCKET_NAME  = ${AWS_S3_BUCKET_NAME}"
        echo ""

    - name: Install this package
      run: |
        pip install .[all]

    - name: Run a Docker container with the fuzzing server and upload reports
      run: |
        cd wstest
        make wstest_server_docker_stop
        make wstest_server_docker_pull
        make wstest_server_docker_quick
        sleep 5
        python testee_client_tx.py
        python testee_client_aio.py
        make wstest_server_docker_stop
        pwd
        ls -la .
        ls -la ./reports
        aws s3 sync --delete --acl public-read --region=${AWS_DEFAULT_REGION} \
          ./reports \
          s3://crossbario.com/reports/websocket-testsuite/autobahn-${AUTOBAHN_VERSION}-${{ matrix.python-version }}