59 أسطر
1.2 KiB
YAML
59 أسطر
1.2 KiB
YAML
name: Ghaymah Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
pull_request:
|
|
branches: ["main"]
|
|
|
|
jobs:
|
|
|
|
test:
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install pytest
|
|
pip install pylint
|
|
pip install bandit
|
|
pip install -r requirements.txt
|
|
|
|
- name: Run Bandit (Static Security Analysis)
|
|
run: bandit -r . -f txt -o bandit-report.txt --exit-zero
|
|
|
|
- name: Run pylint
|
|
run: pylint .
|
|
|
|
- name: Run tests
|
|
run: pytest -q
|
|
|
|
|
|
|
|
|
|
build:
|
|
|
|
needs: test
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download and Configure CLI
|
|
run: |
|
|
curl -sSL https://cli.ghaymah.systems/install.sh | bash
|
|
|
|
- name: Login
|
|
run: $HOME/ghaymah/bin/gy auth login --email "$EMAIL" --password "$PASSWORD"
|
|
env:
|
|
EMAIL: ${{ secrets.EMAIL }}
|
|
PASSWORD: ${{ secrets.PASSWORD }}
|
|
|
|
- name: Launch App
|
|
run: $HOME/ghaymah/bin/gy resource app launch
|