From 37258f364285de9ebee2101cffb0a1bcf04abbe5 Mon Sep 17 00:00:00 2001 From: Luqman Date: Tue, 17 Jan 2023 18:01:07 +0100 Subject: [PATCH] Feature/release branch gitflow (#3998) * release branch gitflow implentation --- .github/workflows/linting.yml | 4 +--- .github/workflows/unit-test.yml | 15 ++++++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 25501201bd5..ba3ccdabc20 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -8,13 +8,11 @@ env: PIP_DEFAULT_TIMEOUT: 100 on: - pull_request: - types: [opened, synchronize, edited] push: branches: - 'feature/*' - 'hotfix/*' - - 'release/[0-9]+\.[0-9]+\.[0-9]+(rc[0-9]+)?' + - 'release/*' # Cancel previous runs that are not yet completed. concurrency: diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 08ab8472086..fd0ae41914a 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -13,6 +13,9 @@ on: - develop - main types: [opened, synchronize, edited, closed] + push: + branches: + - release/* concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -22,7 +25,8 @@ jobs: check-files-changed: name: Check for changes runs-on: ubuntu-latest - if: github.event.pull_request.merged != true + # Run this job only if the PR is not merged and the event is not a push + if: github.event.pull_request.merged == false && github.event_name != 'push' outputs: check-changes: ${{ steps.check-changes.outputs.check-changes }} steps: @@ -100,7 +104,7 @@ jobs: tests-python: name: Vanilla Python Tests - ${{ matrix.python-version }} - needs: [check-files-changed, base-test] + needs: [base-test] runs-on: ${{ matrix.os }} strategy: fail-fast: true @@ -149,7 +153,7 @@ jobs: MPLBACKEND: Agg run: | source $VENV - pytest tests/ --optimization + pytest tests/ --optimization --autodoc - name: Start Terminal and exit run: | @@ -159,7 +163,8 @@ jobs: full-test: name: Full Test Suite - (${{ matrix.python-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} - if: github.event.pull_request.merged == true + # Run only when a PR is merged or a push to release/* branch + if: github.event_name == 'push' || github.event.pull_request.merged == true strategy: fail-fast: true matrix: @@ -217,7 +222,7 @@ jobs: tests-conda: name: Anaconda Python Tests - (${{ matrix.python-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }}-latest - if: github.event.pull_request.merged == true + if: github.event_name == 'push' || github.event.pull_request.merged == true strategy: fail-fast: false matrix: