From 5b86095452f3a652f8ab8d190105ea5db593f844 Mon Sep 17 00:00:00 2001 From: Vuillemot Florian Date: Fri, 2 Feb 2024 18:46:53 +0100 Subject: [PATCH] Trigger workflow from another --- .github/workflows/dependencies-management.yml | 32 ++--- .github/workflows/overall-tests.yml | 129 ++++++++++-------- 2 files changed, 88 insertions(+), 73 deletions(-) diff --git a/.github/workflows/dependencies-management.yml b/.github/workflows/dependencies-management.yml index 66d9ba3e1a..135357521e 100644 --- a/.github/workflows/dependencies-management.yml +++ b/.github/workflows/dependencies-management.yml @@ -41,19 +41,19 @@ jobs: echo EOF >> "$GITHUB_OUTPUT" cat pipfiles/Pipfile${{matrix.python-version}}.max - - name: Create the pull_request - # Python3.8 must not update the dependencies. - if: steps.ensure-dependencies-are-up-to-date.outputs.diff != '' and ${{matrix.python-version}} != '3.8' - uses: peter-evans/create-pull-request@v5 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Update dependencies - branch: dependencies/update-python${{matrix.python-version}} - base: develop - title: 'New dependencies available for Python${{matrix.python-version}}' - body: | - ${{ steps.ensure-dependencies-are-up-to-date.outputs.diff }} - draft: false - add-paths: | - tools/packages/pipfiles/Pipfile${{matrix.python-version}}.max - tools/packages/taipy*/*requirements.txt + # - name: Create the pull_request + # # Python3.8 must not update the dependencies. + # if: steps.ensure-dependencies-are-up-to-date.outputs.diff != '' and ${{matrix.python-version}} != '3.8' + # uses: peter-evans/create-pull-request@v5 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # commit-message: Update dependencies + # branch: dependencies/update-python${{matrix.python-version}} + # base: develop + # title: 'New dependencies available for Python${{matrix.python-version}}' + # body: | + # ${{ steps.ensure-dependencies-are-up-to-date.outputs.diff }} + # draft: false + # add-paths: | + # tools/packages/pipfiles/Pipfile${{matrix.python-version}}.max + # tools/packages/taipy*/*requirements.txt diff --git a/.github/workflows/overall-tests.yml b/.github/workflows/overall-tests.yml index 0118b3aac1..cb6a30470f 100644 --- a/.github/workflows/overall-tests.yml +++ b/.github/workflows/overall-tests.yml @@ -5,70 +5,85 @@ on: branches: [ develop, dev/*, release/* ] pull_request: branches: [ develop, dev/*, release/* ] + workflow_dispatch: jobs: - partial-tests: - uses: ./.github/workflows/partial-tests.yml + # partial-tests: + # uses: ./.github/workflows/partial-tests.yml - overall-tests: - needs: [partial-tests] - timeout-minutes: 50 - strategy: - fail-fast: false - matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - os: [ubuntu-latest, windows-latest, macos-latest] - pipfile-version: ['min', 'max'] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 + # overall-tests: + # needs: [partial-tests] + # timeout-minutes: 50 + # strategy: + # fail-fast: false + # matrix: + # python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + # os: [ubuntu-latest, windows-latest, macos-latest] + # pipfile-version: ['min', 'max'] + # runs-on: ${{ matrix.os }} + # steps: + # - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: ${{matrix.python-version}} + # - uses: actions/setup-python@v5 + # with: + # python-version: ${{matrix.python-version}} - - name: Install dependencies - id: install-dependencies - uses: ./.github/actions/install - with: - python-version: ${{ matrix.python-version }} - os: ${{ matrix.os }} - pipfile-version: ${{ matrix.pipfile-version }} + # - name: Install dependencies + # id: install-dependencies + # uses: ./.github/actions/install + # with: + # python-version: ${{ matrix.python-version }} + # os: ${{ matrix.os }} + # pipfile-version: ${{ matrix.pipfile-version }} - - name: Pytest - run: pipenv run pytest -m "not orchestrator_dispatcher and not standalone and not teste2e" --cov=taipy --cov-append --cov-report="xml:overall-coverage.xml" --cov-report term-missing tests + # - name: Pytest + # run: pipenv run pytest -m "not orchestrator_dispatcher and not standalone and not teste2e" --cov=taipy --cov-append --cov-report="xml:overall-coverage.xml" --cov-report term-missing tests - - name: Coverage - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' && matrix.pipfile-version == 'min' - uses: MishaKav/pytest-coverage-comment@main - with: - pytest-xml-coverage-path: ./overall-coverage.xml - title: Taipy Overall Coverage Report + # - name: Coverage + # if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' && matrix.pipfile-version == 'min' + # uses: MishaKav/pytest-coverage-comment@main + # with: + # pytest-xml-coverage-path: ./overall-coverage.xml + # title: Taipy Overall Coverage Report - intermittent-tests: - needs: [partial-tests] - timeout-minutes: 40 - strategy: - fail-fast: false - matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - os: [ubuntu-latest, windows-latest, macos-latest] - orchestrator: ['orchestrator_dispatcher', 'standalone'] - pipfile-version: ['min', 'max'] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: ${{matrix.python-version}} + # intermittent-tests: + # needs: [partial-tests] + # timeout-minutes: 40 + # strategy: + # fail-fast: false + # matrix: + # python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + # os: [ubuntu-latest, windows-latest, macos-latest] + # orchestrator: ['orchestrator_dispatcher', 'standalone'] + # pipfile-version: ['min', 'max'] + # runs-on: ${{ matrix.os }} + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-python@v5 + # with: + # python-version: ${{matrix.python-version}} - - name: Install dependencies - uses: ./.github/actions/install - with: - os: ${{ matrix.os }} - install-gui: false - python-version: ${{ matrix.python-version }} - pipfile-version: ${{ matrix.pipfile-version }} + # - name: Install dependencies + # uses: ./.github/actions/install + # with: + # os: ${{ matrix.os }} + # install-gui: false + # python-version: ${{ matrix.python-version }} + # pipfile-version: ${{ matrix.pipfile-version }} + + # - name: Pytest Core orchestrator_dispatcher + # run: pipenv run pytest -m "${{ matrix.orchestrator }}" tests/core - - name: Pytest Core orchestrator_dispatcher - run: pipenv run pytest -m "${{ matrix.orchestrator }}" tests/core + build: + runs-on: ubuntu-latest + steps: + - name: Trigger Workflow + uses: actions/github-script@v6 + with: + script: | + github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'dependencies-management.yml', + ref: 'fix/#414-run-tests-with-new-dependencies', + })