Skip to content

Fixed destroy_all_scenarios whitelist bug (#380) #28

Fixed destroy_all_scenarios whitelist bug (#380)

Fixed destroy_all_scenarios whitelist bug (#380) #28

Workflow file for this run

# This is a GitHub Actions yaml file.
# This file will build and test the application.
# The name of the workflow. This is the name that will be displayed on the Actions tab.
name: Run Tests
# The event that triggers the workflow.
# In GitHub Actions, the 'on' mapping is used to specify the events that will
# trigger the workflow. The on mapping is a required key in the workflow file
# and must be present in order to define when the workflow should run.
# In this case, this 'on':
# Triggers the workflow on a push or pull-request event to the 'main' or 'test-github-actions' branch.
# A new commit pushed to the branch is considered a push event.
on:
push:
paths:
- "cloudgoat/**/*.py"
- "cloudgoat/*.py"
pull_request:
paths:
- "cloudgoat/**/*.py"
- "cloudgoat/*.py"
workflow_dispatch:
# A job is a set of steps in a workflow that is executed on the same runner.
# Each step is either:
# - a shell script that will be executed
# - an action that will be run.
# Steps are executed in order and are dependent on each other.
# Since each step can share data from one step to another.
# For example, you can have a step that builds your application
# followed by a step that tests the application that was built.
jobs:
# This is the 'checkout-and-test' job.
# 1. checkout the repository code.
# 2. run the software tests.
build-and-test:
# Use an Ubuntu virtual machine to run the job.
runs-on: ubuntu-latest
# The 'strategy' key allows you to define a matrix of values that will be used to
# generate a build matrix.
strategy:
# The 'matrix' key is used to define the values that will be used to generate the build matrix.
matrix:
# The 'python-version' key is used to define the Python versions that will be used.
python-version: [
3.9, # Older
3.13.2, # latest stable
]
# The steps that the job will execute.
steps:
# Checkout the repository code.
- name: Checkout code
uses: actions/checkout@v2
# Set up Python.
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
# Install dependencies.
- name: Install dependencies
run: pip install -r requirements.txt
# Install pytest.
- name: Install pytest
run: pip install pytest
# Run the tests.
- name: Run pytest tests
run: pytest tests/ -v
# Run unittest tests.
- name: Run unittest tests
run: python -m unittest discover -s tests/ -p "*tests.py"