Skip to content

Update run_smoke_test.yml #48

Update run_smoke_test.yml

Update run_smoke_test.yml #48

name: Run Smoke Test
on:
pull_request:
types: [opened, reopened]
branches:
- "main"
push:
# Uncomment when testing locally
#paths:
# - ".github/workflows/run_smoke_test.yml"
# - ".github/actions/setup-dependencies-windows/action.yml"
# - ".github/actions/setup-dependencies-macos/action.yml"
branches:
- "main"
workflow_call:
workflow_dispatch:
inputs:
os:
description: "Choose operating system(s), format must be an array of strings:"
type: string
default: "'windows-latest', 'macos-latest'"
python-version:
description: "Choose python version(s), format must be an array of strings:"
type: string
default: "'3.10'"
opa-version:
description: "Choose OPA version"
required: true
type: string
default: "0.59.0"
env:
OS_DEFAULT: ${{ inputs.os || "'windows-latest', 'macos-latest'" }}

Check failure on line 33 in .github/workflows/run_smoke_test.yml

View workflow run for this annotation

GitHub Actions / Run Smoke Test

Invalid workflow file

The workflow is not valid. .github/workflows/run_smoke_test.yml (Line: 33, Col: 15): Unexpected symbol: '"'windows-latest''. Located at position 14 within expression: inputs.os || "'windows-latest', 'macos-latest'" .github/workflows/run_smoke_test.yml (Line: 34, Col: 27): Unexpected symbol: '"'3'. Located at position 26 within expression: inputs.python-version || "'3.10'"
PYTHON_VERSION_DEFAULT: ${{ inputs.python-version || "'3.10'" }}
jobs:
smoke-test:
environment: Development
strategy:
fail-fast: false
matrix:
#os: ${{ fromJSON(inputs.os) }}
os: ['${{ env.OS_DEFAULT }}']
# See https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json,
# ctrl + f and search "python-3.<minor>.<patch>-<darwin-arm64/win32/linux>" for supported versions
#python-version: ${{ fromJSON(inputs.python-version) }}
python-version: ['${{ env.PYTHON_VERSION_DEFAULT }}']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Python v${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "requirements.txt"
- name: Setup Dependencies (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: ./.github/actions/setup-dependencies-windows
with:
operating-system: "windows"
opa-version: ${{ inputs.opa-version }}
python-version: ${{ matrix.python-version }}
- name: Setup Dependencies (macOS)
if: ${{ matrix.os == 'macos-latest' }}
uses: ./.github/actions/setup-dependencies-macos
with:
operating-system: "macos"
opa-version: ${{ inputs.opa-version }}
python-version: ${{ matrix.python-version }}
- name: Setup credentials for service account
id: create-json
uses: jsdaniell/[email protected]
with:
name: "credentials.json"
json: ${{ secrets.GWS_GITHUB_AUTOMATION_CREDS }}
- name: Run ScubaGoggles and check for correct output
run: pytest -s -vvv ./Testing/Functional/SmokeTests/ --subjectemail="${{ secrets.GWS_SUBJECT_EMAIL }}" --domain="${{ secrets.GWS_DOMAIN }}"