Skip to content

Update hackercmd.yml #4

Update hackercmd.yml

Update hackercmd.yml #4

Workflow file for this run

name: HackerCMD CI/CD
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch: # Allows manual triggering
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt # Install dependencies from the requirements.txt file
- name: Install Nmap
run: |
sudo apt-get update
sudo apt-get install -y nmap # Install Nmap tool on the runner
- name: Run Tests
run: |
pytest --maxfail=1 --disable-warnings -q
- name: Build Project
run: |
echo "Building HackerCMD..."
- name: Deploy to Staging (optional)
run: |
echo "Deploying to staging server..."
if: github.ref == 'refs/heads/main'
lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Run Linting
run: |
pip install flake8
flake8 .