From 456e942e2d25b60944047927f49fb824977acf1e Mon Sep 17 00:00:00 2001 From: Julien Barreau Date: Mon, 6 Jan 2025 15:30:30 +0100 Subject: [PATCH] chore: restore correct values --- .github/workflows/generic.yml | 178 +++++++++++++++++----------------- 1 file changed, 88 insertions(+), 90 deletions(-) diff --git a/.github/workflows/generic.yml b/.github/workflows/generic.yml index 96827e49..46122094 100644 --- a/.github/workflows/generic.yml +++ b/.github/workflows/generic.yml @@ -24,98 +24,96 @@ on: SLACK_WEBHOOK: required: true jobs: - # TODO: uncomment - # changes: - # name: changes - # runs-on: ubuntu-latest - # outputs: - # packages: ${{ steps.changes.outputs.packages }} - # steps: - # - uses: actions/checkout@v4 - # - id: changes - # uses: ./.github/actions/changes - # lint: - # name: Linting - # needs: [ changes ] - # runs-on: ubuntu-latest - # strategy: - # matrix: - # python-version: ['3.10'] - # current_package: ${{ fromJson(inputs.packages) }} - # steps: - # - name: has change in sub package - # id: has_change - # run: | - # PACKAGE_NAME=$(echo $PACKAGE | cut -d'/' -f3) - # echo "has_change=$(echo $CHANGES | jq -r .$PACKAGE_NAME)" >> $GITHUB_OUTPUT - # shell: bash - # env: - # PACKAGE: ${{ matrix.current_package }} - # CHANGES: ${{ needs.changes.outputs.packages }} - # - uses: actions/checkout@v4 - # if: ${{ steps.has_change.outputs.has_change != 'false' }} - # - id: lint - # if: ${{ steps.has_change.outputs.has_change != 'false' }} - # uses: ./.github/actions/linting - # with: - # python-version: ${{ matrix.python-version }} - # current_package: ${{ matrix.current_package }} - # isort: - # name: Isorting - # needs: [ changes ] - # runs-on: ubuntu-latest - # strategy: - # matrix: - # python-version: ['3.10'] - # current_package: ${{ fromJson(inputs.packages) }} - # steps: - # - name: has change in sub package - # id: has_change - # run: | - # PACKAGE_NAME=$(echo $PACKAGE | cut -d'/' -f3) - # echo "has_change=$(echo $CHANGES | jq -r .$PACKAGE_NAME)" >> $GITHUB_OUTPUT - # shell: bash - # env: - # PACKAGE: ${{ matrix.current_package }} - # CHANGES: ${{ needs.changes.outputs.packages }} - # - uses: actions/checkout@v4 - # if: ${{ steps.has_change.outputs.has_change != 'false' }} - # - id: isort - # if: ${{ steps.has_change.outputs.has_change != 'false' }} - # uses: ./.github/actions/isort - # with: - # python-version: ${{ matrix.python-version }} - # current_package: ${{ matrix.current_package }} - # black: - # name: Black - # needs: [ changes ] - # runs-on: ubuntu-latest - # strategy: - # matrix: - # python-version: ['3.10'] - # current_package: ${{ fromJson(inputs.packages) }} - # steps: - # - name: has change in sub package - # id: has_change - # run: | - # PACKAGE_NAME=$(echo $PACKAGE | cut -d'/' -f3) - # echo "has_change=$(echo $CHANGES | jq -r .$PACKAGE_NAME)" >> $GITHUB_OUTPUT - # shell: bash - # env: - # PACKAGE: ${{ matrix.current_package }} - # CHANGES: ${{ needs.changes.outputs.packages }} - # - uses: actions/checkout@v4 - # if: ${{ steps.has_change.outputs.has_change != 'false' }} - # - id: isort - # if: ${{ steps.has_change.outputs.has_change != 'false' }} - # uses: ./.github/actions/black - # with: - # python-version: ${{ matrix.python-version }} - # current_package: ${{ matrix.current_package }} + changes: + name: changes + runs-on: ubuntu-latest + outputs: + packages: ${{ steps.changes.outputs.packages }} + steps: + - uses: actions/checkout@v4 + - id: changes + uses: ./.github/actions/changes + lint: + name: Linting + needs: [ changes ] + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.10'] + current_package: ${{ fromJson(inputs.packages) }} + steps: + - name: has change in sub package + id: has_change + run: | + PACKAGE_NAME=$(echo $PACKAGE | cut -d'/' -f3) + echo "has_change=$(echo $CHANGES | jq -r .$PACKAGE_NAME)" >> $GITHUB_OUTPUT + shell: bash + env: + PACKAGE: ${{ matrix.current_package }} + CHANGES: ${{ needs.changes.outputs.packages }} + - uses: actions/checkout@v4 + if: ${{ steps.has_change.outputs.has_change != 'false' }} + - id: lint + if: ${{ steps.has_change.outputs.has_change != 'false' }} + uses: ./.github/actions/linting + with: + python-version: ${{ matrix.python-version }} + current_package: ${{ matrix.current_package }} + isort: + name: Isorting + needs: [ changes ] + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.10'] + current_package: ${{ fromJson(inputs.packages) }} + steps: + - name: has change in sub package + id: has_change + run: | + PACKAGE_NAME=$(echo $PACKAGE | cut -d'/' -f3) + echo "has_change=$(echo $CHANGES | jq -r .$PACKAGE_NAME)" >> $GITHUB_OUTPUT + shell: bash + env: + PACKAGE: ${{ matrix.current_package }} + CHANGES: ${{ needs.changes.outputs.packages }} + - uses: actions/checkout@v4 + if: ${{ steps.has_change.outputs.has_change != 'false' }} + - id: isort + if: ${{ steps.has_change.outputs.has_change != 'false' }} + uses: ./.github/actions/isort + with: + python-version: ${{ matrix.python-version }} + current_package: ${{ matrix.current_package }} + black: + name: Black + needs: [ changes ] + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.10'] + current_package: ${{ fromJson(inputs.packages) }} + steps: + - name: has change in sub package + id: has_change + run: | + PACKAGE_NAME=$(echo $PACKAGE | cut -d'/' -f3) + echo "has_change=$(echo $CHANGES | jq -r .$PACKAGE_NAME)" >> $GITHUB_OUTPUT + shell: bash + env: + PACKAGE: ${{ matrix.current_package }} + CHANGES: ${{ needs.changes.outputs.packages }} + - uses: actions/checkout@v4 + if: ${{ steps.has_change.outputs.has_change != 'false' }} + - id: isort + if: ${{ steps.has_change.outputs.has_change != 'false' }} + uses: ./.github/actions/black + with: + python-version: ${{ matrix.python-version }} + current_package: ${{ matrix.current_package }} test: name: Test - # TODO - # needs: [isort, lint, black] + needs: [isort, lint, black] runs-on: ubuntu-latest strategy: matrix: