Skip to content

Commit

Permalink
Merge pull request #1 from rabea-al/main
Browse files Browse the repository at this point in the history
Spark Component library lock requirement
  • Loading branch information
MFA-X-AI authored Oct 23, 2024
2 parents 6e48592 + 647792b commit 2acdf65
Show file tree
Hide file tree
Showing 6 changed files with 1,574 additions and 1,484 deletions.
47 changes: 25 additions & 22 deletions .github/workflows/run-workflow-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,36 @@ on:
branches: [ main ]
pull_request:
branches: "*"
workflow_dispatch:

jobs:
build-and-run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
env:
TEST_XIRCUITS: |
examples/SparkSQLPlotBar.xircuits
examples/SparkLinePlot.xircuits
examples/SparkLogisticRegressionSample.xircuits
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- uses: actions/setup-java@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
java-version: '17'
distribution: temurin
python-version: ${{ matrix.python-version }}

- uses: vemonet/setup-spark@v1
with:
spark-version: '3.5.0'
hadoop-version: '3'
- name: Create virtual environment
run: |
python -m venv venv
echo "${{ github.workspace }}/venv/bin" >> $GITHUB_PATH
- name: Install xircuits
- name: Install xircuits in virtual environment
run: pip install xircuits

- name: Set Environment Variables
Expand All @@ -45,19 +50,17 @@ jobs:
fi
- name: List Xircuits
run: xircuits list
run: xircuits list

- name: Clone Repository
run: |
# as of 1.9, xai_pytorch still lives in the base xircuits installation
rm -rf ${{ env.COMPONENT_LIBRARY_PATH }}
git clone -b ${{ env.BRANCH_NAME }} https://github.com/${{ github.repository }} ${{ env.COMPONENT_LIBRARY_PATH }}
- name: Setup XAI SKLearn Components
run: |
# as of 1.9, xai_sklearn still lives in the base xircuits installation
rm -rf xai_components/xai_sklearn
git clone https://github.com/XpressAI/xai-sklearn xai_components/xai_sklearn
if [ "${{ github.event_name }}" == "pull_request" ]; then
REPO_URL="${{ github.event.pull_request.head.repo.clone_url }}"
else
REPO_URL="https://github.com/${{ github.repository }}"
fi
git clone -b ${{ env.BRANCH_NAME }} $REPO_URL ${{ env.COMPONENT_LIBRARY_PATH }}
- name: Install Component Library
run: |
Expand All @@ -67,7 +70,7 @@ jobs:
else
echo "requirements.txt not found."
fi
- name: Test .xircuits Workflows
run: |
export PYTHONPATH="${GITHUB_WORKSPACE}:${PYTHONPATH}"
Expand Down Expand Up @@ -111,7 +114,7 @@ jobs:
- name: Upload log file
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.LIBRARY_NAME }}-validation-workflow
path: ${{ github.workspace }}/workflow_logs.txt
name: ${{ env.LIBRARY_NAME }}-validation-workflow-${{ matrix.python-version }}
path: ${{ github.workspace }}/workflow_logs.txt
Loading

0 comments on commit 2acdf65

Please sign in to comment.