diff --git a/.github/actions/initialize-scubagoggles/action.yml b/.github/actions/initialize-scubagoggles/action.yml index 34abd6af..c6021a94 100644 --- a/.github/actions/initialize-scubagoggles/action.yml +++ b/.github/actions/initialize-scubagoggles/action.yml @@ -6,12 +6,6 @@ inputs: cache-dependency-path: required: true default: "requirements.txt" - operating-system: - required: true - default: "windows" - opa-version: - required: true - default: "0.60.0" runs: using: "composite" @@ -22,32 +16,3 @@ runs: python-version: ${{ inputs.python-version }} cache: "pip" cache-dependency-path: ${{ inputs.cache-dependency-path }} - - - name: Setup virtualenv for Windows - if: ${{ inputs.operating-system }} == "windows" - shell: powershell - run: | - pip install virtualenv - python -m venv .venv - .venv\Scripts\activate - - - name: Setup virtualenv for MacOS - if: ${{ inputs.operating-system }} == "macos" - shell: bash - run: | - pip install virtualenv - virtualenv -p python .venv - source .venv/bin/activate - - - name: Install dependencies - shell: powershell - run: | - python -m pip install . - pip install -r requirements.txt - pip install pytest - pip uninstall numpy - pip install -y numpy==1.26.4 - - - name: Download OPA executable - shell: powershell - run: python download_opa.py -v ${{ inputs.opa-version }} -os ${{ inputs.operating-system }} diff --git a/.github/actions/setup-macos-dependencies/action.yml b/.github/actions/setup-macos-dependencies/action.yml new file mode 100644 index 00000000..99aba67d --- /dev/null +++ b/.github/actions/setup-macos-dependencies/action.yml @@ -0,0 +1,29 @@ +name: Setup MacOS Dependencies +inputs: + operating-system: + required: true + default: "macos" + opa-version: + required: true + default: "0.60.0" + +runs: + using: "composite" + shell: bash + steps: + - name: Setup virtualenv + run: | + pip install virtualenv + virtualenv -p python .venv + source .venv/bin/activate + + - name: Install dependencies + run: | + python -m pip install . + pip install -r requirements.txt + pip install pytest + pip uninstall numpy + pip install -y numpy==1.26.4 + + - name: Download OPA executable + run: python download_opa.py -v ${{ inputs.opa-version }} -os ${{ inputs.operating-system }} \ No newline at end of file diff --git a/.github/actions/setup-windows-dependencies/action.yml b/.github/actions/setup-windows-dependencies/action.yml new file mode 100644 index 00000000..3aeff045 --- /dev/null +++ b/.github/actions/setup-windows-dependencies/action.yml @@ -0,0 +1,29 @@ +name: Setup Windows Dependencies +inputs: + operating-system: + required: true + default: "windows" + opa-version: + required: true + default: "0.60.0" + +runs: + using: "composite" + shell: powershell + steps: + - name: Setup virtualenv + run: | + pip install virtualenv + python -m venv .venv + .venv\Scripts\activate + + - name: Install dependencies + run: | + python -m pip install . + pip install -r requirements.txt + pip install pytest + pip uninstall numpy + pip install -y numpy==1.26.4 + + - name: Download OPA executable + run: python download_opa.py -v ${{ inputs.opa-version }} -os ${{ inputs.operating-system }} \ No newline at end of file diff --git a/.github/workflows/run_smoke_test.yml b/.github/workflows/run_smoke_test.yml index 6327ddf7..923de698 100644 --- a/.github/workflows/run_smoke_test.yml +++ b/.github/workflows/run_smoke_test.yml @@ -35,6 +35,10 @@ jobs: with: python-version: "3.12" cache-dependency-path: "requirements.txt" + + - name: Setup Windows dependencies + uses: ./.github/actions/setup-windows-dependencies + with: operating-system: "windows" opa-version: "0.60.0" @@ -57,6 +61,10 @@ jobs: with: python-version: "3.12" cache-dependency-path: "requirements.txt" + + - name: Setup MacOS dependencies + uses: ./.github/actions/setup-macos-dependencies + with: operating-system: "macos" opa-version: "0.60.0"