From 9db256c21075917741ec804528bd9fa1ef987d1f Mon Sep 17 00:00:00 2001 From: detlefarend Date: Tue, 10 Dec 2024 22:50:27 +0100 Subject: [PATCH] update workflows --- .github/workflows.old/ci.yml | 165 -------------------------- .github/workflows.old/pypi_deploy.yml | 49 -------- 2 files changed, 214 deletions(-) delete mode 100644 .github/workflows.old/ci.yml delete mode 100644 .github/workflows.old/pypi_deploy.yml diff --git a/.github/workflows.old/ci.yml b/.github/workflows.old/ci.yml deleted file mode 100644 index 492b4ca..0000000 --- a/.github/workflows.old/ci.yml +++ /dev/null @@ -1,165 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Unit Tests - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - schedule: - - cron: '00 1 * * 1' - workflow_dispatch: - - -jobs: - deps_gen: - runs-on: ubuntu-latest - outputs: - trigger_build: ${{ steps.trigger_build.outputs.build }} - - steps: - - name: Checkout Codes - uses: actions/checkout@v3 - with: - token: ${{ secrets.CI_UNIT_TEST }} - ref: ${{ github.head_ref }} - - - name: Commit files - id: auto-commit-action - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Dependencies Generation - branch: ${{ github.head_ref }} - commit_user_name: MLPro Administration - commit_user_email: mlpro@listen.fh-swf.de - - - name: "Run if changes not detected" - if: steps.auto-commit-action.outputs.changes_detected == 'false' - id: trigger_build - run: echo "build=true" >> $GITHUB_OUTPUT - - ubuntu_test: - runs-on: ubuntu-latest - needs: deps_gen - if: needs.deps_gen.outputs.trigger_build == 'true' - strategy: - matrix: - python-version: ['3.10', '3.11', '3.12'] - - steps: - - name: Checkout Codes - uses: actions/checkout@v3 - with: - ref: ${{ github.head_ref }} - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - pip install pip --upgrade - pip install flake8 pytest - pip install -r requirements.txt - - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - - name: Test with pytest - run: | - make pytest - - doc_test: - runs-on: ubuntu-latest - needs: deps_gen - if: needs.deps_gen.outputs.trigger_build == 'true' - strategy: - matrix: - python-version: ['3.12'] - - steps: - - name: Checkout Codes - uses: actions/checkout@v3 - with: - ref: ${{ github.head_ref }} - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - pip install flake8 pytest - pip install -r requirements.txt - pip install sphinx - pip install sphinx-rtd-theme - pip install sphinx-copybutton - pip install sphinx_multitoc_numbering - - - name: Build the Documentation - run: | - make docu - - windows_test: - runs-on: windows-latest - needs: deps_gen - if: needs.deps_gen.outputs.trigger_build == 'true' - strategy: - matrix: - python-version: ['3.12'] - - steps: - - name: Checkout Codes - uses: actions/checkout@v3 - with: - ref: ${{ github.head_ref }} - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - pip install flake8 pytest - pip install -r requirements.txt - - - name: Test with pytest - run: | - make pytest - - macos_test: - runs-on: macos-latest - needs: deps_gen - if: needs.deps_gen.outputs.trigger_build == 'true' - strategy: - matrix: - python-version: ['3.12'] - - steps: - - name: Checkout Codes - uses: actions/checkout@v3 - with: - ref: ${{ github.head_ref }} - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - pip install flake8 pytest - pip install -r requirements.txt - - - name: Test with pytest - run: | - make pytest diff --git a/.github/workflows.old/pypi_deploy.yml b/.github/workflows.old/pypi_deploy.yml deleted file mode 100644 index 36c4c6e..0000000 --- a/.github/workflows.old/pypi_deploy.yml +++ /dev/null @@ -1,49 +0,0 @@ -## ------------------------------------------------------------------------------------------------- -## -- Project : MLPro - The integrative middleware framework for standardized machine learning -## -- Workflow: pypi_deploy.yml -## ------------------------------------------------------------------------------------------------- -## -- History : -## -- yyyy-mm-dd Ver. Auth. Description -## -- 2024 1.0.0 DA Creation -## -- 2024-11-29 1.1.0 DA Updated the version for Python to 3.10 -## ------------------------------------------------------------------------------------------------- - -name: Deployment PyPI - -on: - release: - types: [published] - - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout Codes - uses: actions/checkout@v2 - with: - ref: ${{ github.head_ref }} - - name: Set up Python 3.10 - uses: actions/setup-python@v2 - with: - python-version: '3.10' - - name: Install pypa/build - run: >- - python -m - pip install - build - --user - - name: Build a binary wheel and a source tarball - run: >- - python -m - build - --sdist - --wheel - --outdir dist/ - - name: Publish distribution to PyPI - # if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.PYPI_API_TOKEN }}