Skip to content

Commit

Permalink
lets see if refactoring into separate workflow changes things
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchelbaker-cisa committed Jul 30, 2024
1 parent b9d9878 commit 8bc89a2
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 32 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/run_scubagoggles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Run ScubaGoggles
on:
workflow_call:
inputs:
os:
required: true
workflow_dispatch:

jobs:
run-scubagoggles-windows:
if: ${{ inputs.os }} == "windows-latest"
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup dependencies
uses: ./.github/actions/setup-windows-dependencies
with:
operating-system: "windows"
opa-version: "0.60.0"

- name: Execute ScubaGoggles and check for correct output
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"
run-scubagoggles-macos:
if: ${{ inputs.os }} == "macos-latest"
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup dependencies
uses: ./.github/actions/setup-macos-dependencies
with:
operating-system: "macos"
opa-version: "0.60.0"

- name: Execute ScubaGoggles and check for correct output
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"
68 changes: 36 additions & 32 deletions .github/workflows/run_smoke_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,40 +37,44 @@ jobs:
python-version: ${{ matrix.python }}
cache-dependency-path: "requirements.txt"

- name: Setup Windows dependencies
if: ${{ matrix.os == "windows-latest" }}
uses: ./.github/actions/setup-windows-dependencies
with:
operating-system: "windows"
opa-version: "0.60.0"

- name: Setup macOS dependencies
if: ${{ matrix.os == "macos-latest" }}
uses: ./.github/actions/setup-windows-dependencies
with:
operating-system: "macos"
- name: Setup and Run ScubaGoggles
uses: ./.github/workflows/run_scubagoggles
with:
os: ${{ matrix.os }}
opa-version: "0.60.0"

- 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"
#- name: Setup Windows dependencies
# uses: ./.github/actions/setup-windows-dependencies
# with:
# operating-system: "windows"
# opa-version: "0.60.0"
#
#- name: Setup macOS dependencies
# uses: ./.github/actions/setup-windows-dependencies
# with:
# operating-system: "macos"
# opa-version: "0.60.0"
#
#- 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"

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

0 comments on commit 8bc89a2

Please sign in to comment.