Skip to content

chore(requirements): prune unused deps + switch to zxcvbn-python #28

chore(requirements): prune unused deps + switch to zxcvbn-python

chore(requirements): prune unused deps + switch to zxcvbn-python #28

Workflow file for this run

name: IAM-X-Ray CI/CD
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
test:
name: Run Tests + Coverage + Upload Reports
runs-on: ubuntu-latest
steps:
# ----------------- CHECKOUT -----------------
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
# ----------------- PYTHON SETUP -----------------
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
# ----------------- INSTALL DEPS -----------------
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov
# ----------------- RUN TESTS + COVERAGE -----------------
- name: Run pytest with coverage + JUnit report
run: |
pytest --cov=core --cov=app \
--cov-report=xml \
--cov-report=term-missing \
--junitxml=junit.xml \
-o junit_family=legacy
# ----------------- UPLOAD COVERAGE TO CODECOV -----------------
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
# ----------------- TEST ANALYTICS (OPTIONAL BUT RECOMMENDED) -----------------
- name: Upload test results to Codecov Test Analytics
if: ${{ always() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
# ===================== OPTIONAL CD STAGE ======================
package:
name: Package App Artifact
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Archive application for release
run: |
mkdir dist
zip -r dist/iam-xray.zip app core README.md requirements.txt
- name: Upload Release Artifact
uses: actions/upload-artifact@v4
with:
name: iam-xray-build
path: dist/iam-xray.zip