Skip to content

Continuous-Integration #64

Continuous-Integration

Continuous-Integration #64

Workflow file for this run

name: Continuous-Integration
on:
pull_request:
types:
- auto_merge_enabled
branches:
- staging
merge_group:
permissions:
contents: read
checks: read
env:
EVENT: ${{ github.event_name }}
BRANCH: ${{ github.ref }}
jobs:
ci-tasks:
runs-on: ubuntu-latest
environment: staging
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
pytest -v --cov ./chartly/tests/
- name: Build and upload to Test PyPI
if: ${{ vars.STAGE_TO_PYPI == 'yes' && contains(env.BRANCH, 'staging') && env.EVENT == 'merge_group' }}
env:
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_KEY }}
run: |
echo "📦 Installing Python dependencies."
python -m pip install --upgrade pip
if [ -f requirements/staging.txt ]; then
pip install -r requirements/staging.txt;
fi
python -m pip install --upgrade build
python -m build
python -m twine upload --repository testpypi dist/*
- name: Done
run: echo "🎉 Deployment complete!"