From 675dbc01d86e614aeca90c40e503c89b29fe029a Mon Sep 17 00:00:00 2001 From: Konstanty Karagiorgis Date: Thu, 21 Jul 2022 16:31:45 +0200 Subject: [PATCH] DEVOPS-5661 Missing timeouts for gha workflow --- .github/workflows/package.yaml | 49 ++++++++++++++---------------- .github/workflows/test.yaml | 55 +++++++++++++++++----------------- 2 files changed, 49 insertions(+), 55 deletions(-) diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index 9c155d4..8cf272b 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -1,29 +1,24 @@ ---- name: Build package using various python versions - -"on": - pull_request: - +on: + pull_request: jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] - name: Tests (Python ${{ matrix.python-version }}) - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - architecture: x64 - - - name: Install poetry - uses: abatilo/actions-poetry@c1aba0c402ae0d96fbb6d94050592a56b202009f - - - name: Build and install poetry package - run: poetry build && poetry install - - - name: Verify, that import_logs is properly called - run: poetry run piwik_pro_log_analytics --help + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] + name: Tests (Python ${{ matrix.python-version }}) + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + - name: Install poetry + uses: abatilo/actions-poetry@c1aba0c402ae0d96fbb6d94050592a56b202009f + - name: Build and install poetry package + run: poetry build && poetry install + - name: Verify, that import_logs is properly called + run: poetry run piwik_pro_log_analytics --help + timeout-minutes: 30 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a622fd6..94e0bd1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,30 +1,29 @@ ---- name: Unit tests -"on": - pull_request: - +on: + pull_request: jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] - name: Tests (Python ${{ matrix.python-version }}) - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - architecture: x64 - - name: Install Pytest - run: | - pip install --upgrade pip - pip install pytest - python --version ; pip --version ; pytest --version - shell: bash - - name: Run Tests - run: | - cd tests - ./run_tests.sh - shell: bash + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] + name: Tests (Python ${{ matrix.python-version }}) + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + - name: Install Pytest + run: | + pip install --upgrade pip + pip install pytest + python --version ; pip --version ; pytest --version + shell: bash + - name: Run Tests + run: | + cd tests + ./run_tests.sh + shell: bash + timeout-minutes: 30