From 5351f8a4654bdf4596793f39de87defac81941f2 Mon Sep 17 00:00:00 2001 From: sri2850 <32320907+sri2850@users.noreply.github.com> Date: Mon, 27 Mar 2023 17:23:19 +0530 Subject: [PATCH 01/11] Create main.yml --- .github/workflows/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..ab3af0fa3 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,18 @@ +name: Python CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - run: python my_script.py From 86fe1bdaccd345d9e104318ad83cfce39201d771 Mon Sep 17 00:00:00 2001 From: sri2850 <32320907+sri2850@users.noreply.github.com> Date: Mon, 27 Mar 2023 17:25:18 +0530 Subject: [PATCH 02/11] Delete .github/workflows directory --- .github/workflows/basic-validation.yml | 15 -- .github/workflows/check-dist.yml | 17 -- .github/workflows/codeql-analysis.yml | 13 - .github/workflows/e2e-cache.yml | 131 --------- .github/workflows/e2e-tests.yml | 88 ------ .github/workflows/licensed.yml | 14 - .github/workflows/main.yml | 18 -- .../workflows/release-new-action-version.yml | 28 -- .github/workflows/test-pypy.yml | 169 ------------ .github/workflows/test-python.yml | 255 ------------------ .github/workflows/update-config-files.yml | 11 - 11 files changed, 759 deletions(-) delete mode 100644 .github/workflows/basic-validation.yml delete mode 100644 .github/workflows/check-dist.yml delete mode 100644 .github/workflows/codeql-analysis.yml delete mode 100644 .github/workflows/e2e-cache.yml delete mode 100644 .github/workflows/e2e-tests.yml delete mode 100644 .github/workflows/licensed.yml delete mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/release-new-action-version.yml delete mode 100644 .github/workflows/test-pypy.yml delete mode 100644 .github/workflows/test-python.yml delete mode 100644 .github/workflows/update-config-files.yml diff --git a/.github/workflows/basic-validation.yml b/.github/workflows/basic-validation.yml deleted file mode 100644 index e3e4718cc..000000000 --- a/.github/workflows/basic-validation.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Basic validation - -on: - push: - branches: - - main - paths-ignore: - - '**.md' - pull_request: - paths-ignore: - - '**.md' -jobs: - call-basic-validation: - name: Basic validation - uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml deleted file mode 100644 index c95229131..000000000 --- a/.github/workflows/check-dist.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Check dist/ - -on: - push: - branches: - - main - paths-ignore: - - '**.md' - pull_request: - paths-ignore: - - '**.md' - workflow_dispatch: - -jobs: - call-check-dist: - name: Check dist/ - uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 2f49e971d..000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: CodeQL analysis - -on: - push: - branches: ['main'] - pull_request: - schedule: - - cron: '0 3 * * 0' - -jobs: - call-codeQL-analysis: - name: CodeQL analysis - uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main diff --git a/.github/workflows/e2e-cache.yml b/.github/workflows/e2e-cache.yml deleted file mode 100644 index 115fe8012..000000000 --- a/.github/workflows/e2e-cache.yml +++ /dev/null @@ -1,131 +0,0 @@ -name: e2e-cache - -on: - pull_request: - paths-ignore: - - '**.md' - push: - branches: - - main - - releases/* - paths-ignore: - - '**.md' - -permissions: - contents: read -jobs: - python-pip-dependencies-caching: - name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.9', 'pypy-3.7-v7.x'] - steps: - - uses: actions/checkout@v3 - - name: Setup Python - uses: ./ - with: - python-version: ${{ matrix.python-version }} - cache: 'pip' - - name: Install dependencies - run: pip install numpy pandas requests - - python-pipenv-dependencies-caching: - name: Test pipenv (Python ${{ matrix.python-version}}, ${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.9', 'pypy-3.9-v7.x'] - steps: - - uses: actions/checkout@v3 - - name: Setup Python - uses: ./ - with: - python-version: ${{ matrix.python-version }} - cache: 'pipenv' - - name: Install pipenv - run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python - - name: Install dependencies - shell: pwsh - run: | - mv ./__tests__/data/Pipfile.lock . - mv ./__tests__/data/Pipfile . - if ("${{ matrix.python-version }}" -Match "pypy") { - pipenv install --keep-outdated --python pypy - } else { - pipenv install --keep-outdated --python ${{ matrix.python-version }} - } - - python-poetry-dependencies-caching: - name: Test poetry (Python ${{ matrix.python-version}}, ${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.9', 'pypy-3.8'] - steps: - - uses: actions/checkout@v3 - - name: Install poetry - run: pipx install poetry - - name: Init pyproject.toml - run: mv ./__tests__/data/pyproject.toml . - - name: Setup Python - uses: ./ - with: - python-version: ${{ matrix.python-version }} - cache: 'poetry' - - name: Install dependencies - run: poetry install - - python-pip-dependencies-caching-path: - name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.9', 'pypy-3.7-v7.x'] - steps: - - uses: actions/checkout@v3 - - name: Setup Python - uses: ./ - with: - python-version: ${{ matrix.python-version }} - cache: 'pip' - cache-dependency-path: __tests__/data/requirements.txt - - name: Install dependencies - run: pip install numpy pandas requests - - python-pipenv-dependencies-caching-path: - name: Test pipenv (Python ${{ matrix.python-version}}, ${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.9', 'pypy-3.9-v7.x'] - steps: - - uses: actions/checkout@v3 - - name: Setup Python - uses: ./ - with: - python-version: ${{ matrix.python-version }} - cache: 'pipenv' - cache-dependency-path: '**/pipenv-requirements.txt' - - name: Install pipenv - run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python - - name: Install dependencies - shell: pwsh - run: | - mv ./__tests__/data/Pipfile.lock . - mv ./__tests__/data/Pipfile . - if ("${{ matrix.python-version }}" -Match "pypy") { - pipenv install --keep-outdated --python pypy - } else { - pipenv install --keep-outdated --python ${{ matrix.python-version }} - } diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml deleted file mode 100644 index be6684e77..000000000 --- a/.github/workflows/e2e-tests.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: e2e tests - -on: - push: - branches: - - main - paths-ignore: - - '**.md' - pull_request: - paths-ignore: - - '**.md' - -jobs: - test-setup-python: - name: Test setup-python - runs-on: ${{ matrix.operating-system }} - strategy: - matrix: - operating-system: [ubuntu-20.04, windows-latest] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Run with setup-python 2.7 - uses: ./ - with: - python-version: 2.7 - - name: Verify 2.7 - run: python __tests__/verify-python.py 2.7 - - - name: Run with setup-python 3.5 - uses: ./ - with: - python-version: 3.5 - - name: Verify 3.5 - run: python __tests__/verify-python.py 3.5 - - - name: Run with setup-python 3.6 - uses: ./ - with: - python-version: 3.6 - - name: Verify 3.6 - run: python __tests__/verify-python.py 3.6 - - - name: Run with setup-python 3.7 - uses: ./ - with: - python-version: 3.7 - - name: Verify 3.7 - run: python __tests__/verify-python.py 3.7 - - - name: Run with setup-python 3.8 - uses: ./ - with: - python-version: 3.8 - - name: Verify 3.8 - run: python __tests__/verify-python.py 3.8 - - - name: Run with setup-python 3.7.5 - uses: ./ - with: - python-version: 3.7.5 - - name: Verify 3.7.5 - run: python __tests__/verify-python.py 3.7.5 - - - name: Run with setup-python 3.6.7 - uses: ./ - with: - python-version: 3.6.7 - - name: Verify 3.6.7 - run: python __tests__/verify-python.py 3.6.7 - - - name: Run with setup-python 3.8.1 - uses: ./ - with: - python-version: 3.8.1 - - name: Verify 3.8.1 - run: python __tests__/verify-python.py 3.8.1 - - - name: Run with setup-python 3.10 - id: cp310 - uses: ./ - with: - python-version: '3.10' - - name: Verify 3.10 - run: python __tests__/verify-python.py 3.10 - - name: Run python-path sample 3.10 - run: pipx run --python '${{ steps.cp310.outputs.python-path }}' nox --version diff --git a/.github/workflows/licensed.yml b/.github/workflows/licensed.yml deleted file mode 100644 index a00d7744a..000000000 --- a/.github/workflows/licensed.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Licensed - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - call-licensed: - name: Licensed - uses: actions/reusable-workflows/.github/workflows/licensed.yml@main diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index ab3af0fa3..000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Python CI - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - build: - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - run: python my_script.py diff --git a/.github/workflows/release-new-action-version.yml b/.github/workflows/release-new-action-version.yml deleted file mode 100644 index d8171ef88..000000000 --- a/.github/workflows/release-new-action-version.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Release new action version - -on: - release: - types: [released] - workflow_dispatch: - inputs: - TAG_NAME: - description: 'Tag name that the major tag will point to' - required: true - -env: - TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} -permissions: - contents: write - -jobs: - update_tag: - name: Update the major tag to include the ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} changes - environment: - name: releaseNewActionVersion - runs-on: ubuntu-latest - steps: - - name: Update the ${{ env.TAG_NAME }} tag - uses: actions/publish-action@v0.2.2 - with: - source-tag: ${{ env.TAG_NAME }} - slack-webhook: ${{ secrets.SLACK_WEBHOOK }} diff --git a/.github/workflows/test-pypy.yml b/.github/workflows/test-pypy.yml deleted file mode 100644 index ed9e46faa..000000000 --- a/.github/workflows/test-pypy.yml +++ /dev/null @@ -1,169 +0,0 @@ -name: Validate PyPy e2e - -on: - push: - branches: - - main - paths-ignore: - - '**.md' - pull_request: - paths-ignore: - - '**.md' - schedule: - - cron: 30 3 * * * - -jobs: - setup-pypy: - name: Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-latest] - pypy: - - 'pypy-2.7' - - 'pypy-3.7' - - 'pypy3.9' - - 'pypy-2.7-v7.3.4' - - 'pypy-3.7-v7.3.5' - - 'pypy-3.7-v7.3.4' - - 'pypy-3.7-v7.3.x' - - 'pypy-3.7-v7.x' - - 'pypy-2.7-v7.3.4rc1' - - 'pypy-3.7-nightly' - - 'pypy3.8-v7.3.7' - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: setup-python ${{ matrix.pypy }} - id: setup-python - uses: ./ - with: - python-version: ${{ matrix.pypy }} - - - name: Check python-path - run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}' - shell: bash - - - name: PyPy and Python version - run: python --version - - - name: Run simple code - run: python -c 'import math; print(math.factorial(5))' - - - name: Assert PyPy is running - run: | - import platform - assert platform.python_implementation().lower() == "pypy" - shell: python - - - name: Assert expected binaries (or symlinks) are present - run: | - EXECUTABLE=${{ matrix.pypy }} - EXECUTABLE=${EXECUTABLE/pypy-/pypy} # remove the first '-' in "pypy-X.Y" -> "pypyX.Y" to match executable name - EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe - ${EXECUTABLE} --version - shell: bash - - setup-pypy-noenv: - name: Setup PyPy ${{ matrix.pypy }} ${{ matrix.os }} (noenv) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-latest] - pypy: ['pypy2.7', 'pypy3.7', 'pypy3.8', 'pypy3.9-nightly'] - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: setup-python ${{ matrix.pypy }} - id: setup-python - uses: ./ - with: - python-version: ${{ matrix.pypy }} - update-environment: false - - - name: PyPy and Python version - run: ${{ steps.setup-python.outputs.python-path }} --version - - - name: Run simple code - run: ${{ steps.setup-python.outputs.python-path }} -c 'import math; print(math.factorial(5))' - - check-latest: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - steps: - - uses: actions/checkout@v3 - - name: Setup PyPy and check latest - uses: ./ - with: - python-version: 'pypy-3.7-v7.3.x' - check-latest: true - - name: PyPy and Python version - run: python --version - - - name: Run simple code - run: python -c 'import math; print(math.factorial(5))' - - - name: Assert PyPy is running - run: | - import platform - assert platform.python_implementation().lower() == "pypy" - shell: python - - - name: Assert expected binaries (or symlinks) are present - run: | - EXECUTABLE="pypy-3.7-v7.3.x" - EXECUTABLE=${EXECUTABLE/-/} # remove the first '-' in "pypy-X.Y" -> "pypyX.Y" to match executable name - EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe - ${EXECUTABLE} --version - shell: bash - - setup-pypy-multiple-versions: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - steps: - - uses: actions/checkout@v3 - - name: Setup PyPy and check latest - uses: ./ - with: - python-version: | - pypy-3.7-v7.3.x - pypy3.8 - check-latest: true - - name: PyPy and Python version - run: python --version - - - name: Run simple code - run: python -c 'import math; print(math.factorial(5))' - - - name: Assert PyPy is running - run: | - import platform - assert platform.python_implementation().lower() == "pypy" - shell: python - - - name: Assert expected binaries (or symlinks) are present - run: | - EXECUTABLE="pypy-3.7-v7.3.x" - EXECUTABLE=${EXECUTABLE/-/} # remove the first '-' in "pypy-X.Y" -> "pypyX.Y" to match executable name - EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe - ${EXECUTABLE} --version - shell: bash - - name: Assert expected binaries (or symlinks) are present - run: | - EXECUTABLE='pypy3.8' - EXECUTABLE=${EXECUTABLE/pypy-/pypy} # remove the first '-' in "pypy-X.Y" -> "pypyX.Y" to match executable name - EXECUTABLE=${EXECUTABLE%%-*} # remove any -* suffixe - ${EXECUTABLE} --version - shell: bash diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml deleted file mode 100644 index 333f11cf6..000000000 --- a/.github/workflows/test-python.yml +++ /dev/null @@ -1,255 +0,0 @@ -name: Validate Python e2e - -on: - push: - branches: - - main - paths-ignore: - - '**.md' - pull_request: - paths-ignore: - - '**.md' - schedule: - - cron: 30 3 * * * - workflow_dispatch: - -jobs: - setup-versions-from-manifest: - name: Setup ${{ matrix.python }} ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04] - python: [3.5.4, 3.6.7, 3.7.5, 3.8.1] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: setup-python ${{ matrix.python }} - id: setup-python - uses: ./ - with: - python-version: ${{ matrix.python }} - - - name: Check python-path - run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}' - shell: bash - - - name: Validate version - run: | - $pythonVersion = (python --version) - if ("Python ${{ matrix.python }}" -ne "$pythonVersion"){ - Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}" - exit 1 - } - $pythonVersion - shell: pwsh - - - name: Run simple code - run: python -c 'import math; print(math.factorial(5))' - - setup-versions-from-file: - name: Setup ${{ matrix.python }} ${{ matrix.os }} version file - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04] - python: [3.5.4, 3.6.7, 3.7.5, 3.8.1] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: build-version-file ${{ matrix.python }} - run: echo ${{ matrix.python }} > .python-version - - - name: setup-python ${{ matrix.python }} - id: setup-python - uses: ./ - with: - python-version-file: '.python-version' - - - name: Check python-path - run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}' - shell: bash - - - name: Validate version - run: | - $pythonVersion = (python --version) - if ("Python ${{ matrix.python }}" -ne "$pythonVersion"){ - Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}" - exit 1 - } - $pythonVersion - shell: pwsh - - - name: Run simple code - run: python -c 'import math; print(math.factorial(5))' - - setup-pre-release-version-from-manifest: - name: Setup 3.9.0-beta.4 ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: setup-python 3.9.0-beta.4 - id: setup-python - uses: ./ - with: - python-version: '3.9.0-beta.4' - - - name: Check python-path - run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}' - shell: bash - - - name: Validate version - run: | - $pythonVersion = (python --version) - if ("Python 3.9.0b4" -ne "$pythonVersion"){ - Write-Host "The current version is $pythonVersion; expected version is 3.9.0b4" - exit 1 - } - $pythonVersion - shell: pwsh - - - name: Run simple code - run: python -c 'import math; print(math.factorial(5))' - - setup-dev-version: - name: Setup 3.9-dev ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, windows-latest, ubuntu-latest] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: setup-python 3.9-dev - id: setup-python - uses: ./ - with: - python-version: '3.9-dev' - - - name: Check python-path - run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}' - shell: bash - - - name: Validate version - run: ${{ startsWith(steps.setup-python.outputs.python-version, '3.9.') }} - shell: bash - - - name: Run simple code - run: python -c 'import math; print(math.factorial(5))' - - setup-prerelease-version: - name: Setup 3.12 ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, windows-latest, ubuntu-latest] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: setup-python 3.12 - id: setup-python - uses: ./ - with: - python-version: '3.12' - allow-prereleases: true - - - name: Check python-path - run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}' - shell: bash - - - name: Validate version - run: ${{ startsWith(steps.setup-python.outputs.python-version, '3.12.') }} - shell: bash - - - name: Run simple code - run: python -c 'import math; print(math.factorial(5))' - - setup-versions-noenv: - name: Setup ${{ matrix.python }} ${{ matrix.os }} (noenv) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04] - python: ['3.7', '3.8', '3.9', '3.10'] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: setup-python ${{ matrix.python }} - id: setup-python - uses: ./ - with: - python-version: ${{ matrix.python }} - update-environment: false - - - name: Python version - run: ${{ steps.setup-python.outputs.python-path }} --version - - - name: Run simple code - run: ${{ steps.setup-python.outputs.python-path }} -c 'import math; print(math.factorial(5))' - - check-latest: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.8', '3.9', '3.10'] - steps: - - uses: actions/checkout@v3 - - name: Setup Python and check latest - uses: ./ - with: - python-version: ${{ matrix.python-version }} - check-latest: true - - name: Validate version - run: | - $pythonVersion = (python --version) - if ("$pythonVersion" -NotMatch "${{ matrix.python-version }}"){ - Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python-version }}" - exit 1 - } - $pythonVersion - shell: pwsh - - setup-python-multiple-python-versions: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - steps: - - uses: actions/checkout@v3 - - name: Setup Python and check latest - uses: ./ - with: - python-version: | - 3.7 - 3.8 - 3.9 - 3.10 - check-latest: true - - name: Validate version - run: | - $pythonVersion = (python --version) - if ("$pythonVersion" -NotMatch "3.10"){ - Write-Host "The current version is $pythonVersion; expected version is 3.10" - exit 1 - } - $pythonVersion - shell: pwsh diff --git a/.github/workflows/update-config-files.yml b/.github/workflows/update-config-files.yml deleted file mode 100644 index 87af50042..000000000 --- a/.github/workflows/update-config-files.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Update configuration files - -on: - schedule: - - cron: '0 3 * * 0' - workflow_dispatch: - -jobs: - call-update-configuration-files: - name: Update configuration files - uses: actions/reusable-workflows/.github/workflows/update-config-files.yml@main From 7827a8c84614c60f74b81eca8bf919f93e4e1e65 Mon Sep 17 00:00:00 2001 From: sri2850 <32320907+sri2850@users.noreply.github.com> Date: Mon, 27 Mar 2023 17:26:11 +0530 Subject: [PATCH 03/11] Create main.yaml --- .github/workflows/main.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 000000000..539959530 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,18 @@ +name: NodeJs CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - run: python my_script.py From 5bb1914dce9dacb600565539a0440fc74ff06806 Mon Sep 17 00:00:00 2001 From: sri2850 <32320907+sri2850@users.noreply.github.com> Date: Mon, 27 Mar 2023 17:27:58 +0530 Subject: [PATCH 04/11] Update main.yaml --- .github/workflows/main.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 539959530..3f9185ac4 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -3,8 +3,6 @@ name: NodeJs CI on: push: branches: [ "master" ] - pull_request: - branches: [ "master" ] jobs: build: From e6bf1cb37923ceadcc5f808537967bc63ca3a506 Mon Sep 17 00:00:00 2001 From: sri2850 <32320907+sri2850@users.noreply.github.com> Date: Mon, 27 Mar 2023 17:31:46 +0530 Subject: [PATCH 05/11] Update main.yaml --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 3f9185ac4..6f25489bc 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,4 +1,4 @@ -name: NodeJs CI +name: Python CI on: push: From 6d23f55a57499314237c616f12e5fa90c955bb2e Mon Sep 17 00:00:00 2001 From: sri2850 <32320907+sri2850@users.noreply.github.com> Date: Mon, 27 Mar 2023 17:36:21 +0530 Subject: [PATCH 06/11] Update main.yaml --- .github/workflows/main.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6f25489bc..3bc6aeb64 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,8 +1,10 @@ -name: Python CI +ame: NodeJs CI on: push: branches: [ "master" ] + pull_request: + branches: [ "master" ] jobs: build: From 7d2c322d08f2cfa284b06de3d876a936c0f0825e Mon Sep 17 00:00:00 2001 From: sri2850 <32320907+sri2850@users.noreply.github.com> Date: Mon, 27 Mar 2023 17:36:37 +0530 Subject: [PATCH 07/11] Update main.yaml --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 3bc6aeb64..539959530 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,4 +1,4 @@ -ame: NodeJs CI +name: NodeJs CI on: push: From 2c00d305cd5d7365fffab57ac6bcb42dccc279e2 Mon Sep 17 00:00:00 2001 From: sri2850 <32320907+sri2850@users.noreply.github.com> Date: Mon, 27 Mar 2023 17:37:48 +0530 Subject: [PATCH 08/11] Create python-package-conda.yml --- .github/workflows/python-package-conda.yml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/python-package-conda.yml diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml new file mode 100644 index 000000000..77edc1097 --- /dev/null +++ b/.github/workflows/python-package-conda.yml @@ -0,0 +1,34 @@ +name: Python Package using Conda + +on: [push] + +jobs: + build-linux: + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: '3.10' +# - name: Add conda to system path +# run: | +# # $CONDA is an environment variable pointing to the root of the miniconda directory +# echo $CONDA/bin >> $GITHUB_PATH +# - name: Install dependencies +# run: | +# conda env update --file environment.yml --name base +# - name: Lint with flake8 +# run: | +# conda install flake8 +# # 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: | +# conda install pytest +# pytest From 8caf7bba6848d4f63f1bea12216d725823a42a78 Mon Sep 17 00:00:00 2001 From: sri2850 <32320907+sri2850@users.noreply.github.com> Date: Mon, 27 Mar 2023 17:39:58 +0530 Subject: [PATCH 09/11] Update python-package-conda.yml --- .github/workflows/python-package-conda.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 77edc1097..e42cf0932 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -10,10 +10,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.10' + - run: python my_script.py # - name: Add conda to system path # run: | # # $CONDA is an environment variable pointing to the root of the miniconda directory From 37c4d75e271be5bb394d4137425b24ac569fabf9 Mon Sep 17 00:00:00 2001 From: sri2850 <32320907+sri2850@users.noreply.github.com> Date: Mon, 27 Mar 2023 17:41:35 +0530 Subject: [PATCH 10/11] Update python-package-conda.yml --- .github/workflows/python-package-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index e42cf0932..699904ac5 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/setup-python@v4 with: python-version: '3.10' - - run: python my_script.py + - run: pip install -r requirements.txt # - name: Add conda to system path # run: | # # $CONDA is an environment variable pointing to the root of the miniconda directory From 778ab887036fc2388b5def9b052c2d181c8369bb Mon Sep 17 00:00:00 2001 From: sri2850 <32320907+sri2850@users.noreply.github.com> Date: Mon, 27 Mar 2023 17:42:31 +0530 Subject: [PATCH 11/11] Update python-package-conda.yml --- .github/workflows/python-package-conda.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 699904ac5..957327417 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -14,6 +14,7 @@ jobs: with: python-version: '3.10' - run: pip install -r requirements.txt + # - name: Add conda to system path # run: | # # $CONDA is an environment variable pointing to the root of the miniconda directory