Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for python builds #320

Merged
merged 8 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/actions/test-python/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Python Unit Test
description: Python Unit Test report

inputs:
PYTHON_VERSION:
required: false
default: "3.10"
description: "Default Python version"

runs:
using: "composite"
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.PYTHON_VERSION }}
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi

# - name: Test with pytest
# run: |
# pytest
13 changes: 12 additions & 1 deletion .github/workflows/ci-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ on:
required: false
type: string
description: Default Ruby version
PYTHON_VERSION:
required: false
type: string
description: Default Python version
TEST_DEPENDENCIES:
required: false
type: boolean
Expand Down Expand Up @@ -209,6 +213,14 @@ jobs:
RUBOCOP: ${{ inputs.RUBOCOP }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Test Python
if: ${{ inputs.LANGUAGE == 'Python' }}
uses: ./actions/.github/actions/test-python
with:
PYTHON_VERSION: ${{ inputs.PYTHON_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Test configs
if: inputs.LANGUAGE == 'configs' || inputs.LANGUAGE == 'configs'
Expand All @@ -224,4 +236,3 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY }}

5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ on:
required: false
type: string
default: "3.0.6"
PYTHON_VERSION:
required: false
type: string
default: "3.10"
PUSH:
required: false
type: boolean
Expand Down Expand Up @@ -225,6 +229,7 @@ jobs:
NODE_VERSION: ${{ inputs.NODE_VERSION }}
RUBY_VERSION: ${{ inputs.RUBY_VERSION }}
DOTNET_VERSION: ${{ inputs.DOTNET_VERSION }}
PYTHON_VERSION: ${{ inputs.PYTHON_VERSION }}
TEST_DEPENDENCIES: ${{ inputs.TEST_DEPENDENCIES }}
TEST_DEPENDENCIES_PRIVATE: ${{ inputs.TEST_DEPENDENCIES_PRIVATE }}
DEPENDENCIES_FILE: ${{ inputs.DEPENDENCIES_FILE }}
Expand Down