Skip to content

Commit

Permalink
Trigger workflow from another
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-vuillemot committed Feb 2, 2024
1 parent 0877043 commit 5b86095
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 73 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/dependencies-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
129 changes: 72 additions & 57 deletions .github/workflows/overall-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})

0 comments on commit 5b86095

Please sign in to comment.