Skip to content

Commit

Permalink
try converting workflow to matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchelbaker-cisa committed Jul 30, 2024
1 parent 682147c commit d338222
Showing 1 changed file with 77 additions and 26 deletions.
103 changes: 77 additions & 26 deletions .github/workflows/run_smoke_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,53 +20,45 @@ env:
GWS_GITHUB_AUTOMATION_CREDS: ${{ secrets.GWS_GITHUB_AUTOMATION_CREDS }}

jobs:
smoke-test-windows:
if: false
name: Smoke Test for Windows
runs-on: windows-latest
smoke-test:
strategy:
matrix:
os: [windows-latest, macos-latest]
python-version: [3.8.4, 3.12]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Python
uses: ./.github/actions/setup-python
with:
python-version: "3.12"
python-version: ${{ matrix.python-version }}
cache-dependency-path: "requirements.txt"

- name: Setup dependencies
- 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"
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"
smoke-test-macos:
name: Smoke Test for MacOS
runs-on: macos-latest
#needs: smoke-test-windows
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Python
uses: ./.github/actions/setup-python
with:
python-version: "3.12"
cache-dependency-path: "requirements.txt"

- 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
if: ${{ matrix.os }} == "macos-latest"
run: |
echo "in second step"
Expand All @@ -78,3 +70,62 @@ jobs:
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
# name: Smoke Test for Windows
# runs-on: windows-latest
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v4
#
# - name: Setup Python
# uses: ./.github/actions/setup-python
# with:
# python-version: "3.12"
# cache-dependency-path: "requirements.txt"
#
# - 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"
#
#smoke-test-macos:
# name: Smoke Test for MacOS
# runs-on: macos-latest
# #needs: smoke-test-windows
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v4
#
# - name: Setup Python
# uses: ./.github/actions/setup-python
# with:
# python-version: "3.12"
# cache-dependency-path: "requirements.txt"
#
# - 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"

0 comments on commit d338222

Please sign in to comment.