Skip to content

Commit

Permalink
fairly major change to structure.. should be clear on which action to…
Browse files Browse the repository at this point in the history
… navigate to whether its windows/mac
  • Loading branch information
mitchelbaker-cisa committed Jul 31, 2024
1 parent 50f8731 commit 7d41b60
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 81 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Setup MacOS Dependencies
name: Setup Dependencies (macOS)
inputs:
operating-system:
required: true
Expand Down Expand Up @@ -28,4 +28,16 @@ runs:
- name: Download OPA executable
shell: bash
run: python download_opa.py -v ${{ inputs.opa-version }} -os ${{ inputs.operating-system }}
run: python download_opa.py -v ${{ inputs.opa-version }} -os ${{ inputs.operating-system }}

- name: Setup credentials for service account
shell: bash
run: |
echo "in second step"
# Give OPA executable execute permissions
chmod +x opa_darwin_amd64
# Setup credentials for service account
echo $env:GWS_GITHUB_AUTOMATION_CREDS
echo $env:GWS_GITHUB_AUTOMATION_CREDS >> credentials.json
cat credentials.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Setup Windows Dependencies
name: Setup Dependencies (Windows)
inputs:
operating-system:
required: true
default: "windows"
opa-version:
required: true
default: "0.60.0"
credentials:
required: true

runs:
using: "composite"
Expand All @@ -28,4 +30,8 @@ runs:
- name: Download OPA executable
shell: powershell
run: python download_opa.py -v ${{ inputs.opa-version }} -os ${{ inputs.operating-system }}
run: python download_opa.py -v ${{ inputs.opa-version }} -os ${{ inputs.operating-system }}

- name: Setup credentials for service account
shell: powershell
run: Set-Content -Path credentials.json -Value ${{ inputs.credentials }}
52 changes: 0 additions & 52 deletions .github/workflows/run_scubagoggles.yml

This file was deleted.

34 changes: 9 additions & 25 deletions .github/workflows/run_smoke_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
python: [3.8, 3.12]
python-version: [3.12]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
Expand All @@ -34,43 +34,27 @@ jobs:
- name: Setup Python
uses: ./.github/actions/setup-python
with:
python-version: ${{ matrix.python }}
python-version: ${{ matrix.python-version }}
cache-dependency-path: "requirements.txt"

- name: Setup Windows dependencies
- name: Run ScubaGoggles (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: ./.github/actions/setup-windows-dependencies
uses: ./.github/actions/setup-dependencies-windows
with:
operating-system: "windows"
opa-version: "0.60.0"
credentials: $env:GWS_GITHUB_AUTOMATION_CREDS

- name: Setup macOS dependencies
- name: Run ScubaGoggles (macOS)
if: ${{ matrix.os == 'macos-latest' }}
uses: ./.github/actions/setup-windows-dependencies
uses: ./.github/actions/setup-dependencies-macos
with:
operating-system: "macos"
opa-version: "0.60.0"
credentials: $env:GWS_GITHUB_AUTOMATION_CREDS

- name: Execute ScubaGoggles and check for correct output
if: ${{ matrix.os == 'windows-latest' }}
run: |
# Setup credentials for service account
Set-Content -Path credentials.json -Value $env:GWS_GITHUB_AUTOMATION_CREDS
pytest -s ./Testing/Functional/SmokeTests/ --subjectemail="$env:GWS_SUBJECT_EMAIL"
- name: Execute ScubaGoggles and check for correct output
if: ${{ matrix.os == 'macos-latest' }}
run: |
echo "in second step"
# Give OPA executable execute permissions
chmod +x opa_darwin_amd64
# Setup credentials for service account
echo $env:GWS_GITHUB_AUTOMATION_CREDS
echo $env:GWS_GITHUB_AUTOMATION_CREDS >> credentials.json
cat credentials.json
#pytest -s ./Testing/Functional/SmokeTests/ --subjectemail="$env:GWS_SUBJECT_EMAIL"
run: pytest -s ./Testing/Functional/SmokeTests/ --subjectemail="$env:GWS_SUBJECT_EMAIL"

#smoke-test-windows:
# if: false
Expand Down

0 comments on commit 7d41b60

Please sign in to comment.