generated from cisagov/ScubaGear
-
Notifications
You must be signed in to change notification settings - Fork 25
59 lines (54 loc) · 1.6 KB
/
run_smoke_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Run Smoke Test
on:
workflow_call:
workflow_dispatch:
pull_request:
types: [opened, reopened]
branches:
- "main"
pull_request_review:
types: [submitted]
push:
paths:
- ".github/workflows/run_smoke_test.yml"
branches:
- "main"
- "*smoke*"
jobs:
smoke-test-windows:
name: Smoke Test for Windows OS
runs-on: windows-latest
defaults:
run:
shell: powershell
env:
GWS_SUBJECT_EMAIL: ${{ secrets.GWS_SUBJECT_EMAIL }}
GWS_GITHUB_AUTOMATION_CREDS: ${{ secrets.GWS_GITHUB_AUTOMATION_CREDS }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: "requirements.txt"
- name: Setup virtualenv
run: |
pip install virtualenv
python -m venv .venv
.venv\Scripts\activate
- name: Install project dependencies and OPA
run: |
python -m pip install .
pip install -r requirements.txt
pip install pytest
pip uninstall numpy
pip install numpy==1.26.4
python download_opa.py -v 0.60.0 -os windows
- name: Execute ScubaGoggles and check for correct output
run: |
pip show scubagoggles
# 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"