Skip to content

fix test ci

fix test ci #29

Workflow file for this run

name: ci
on: [push, pull_request]
env:
FLASK_PLUGINKIT_TEST_REDISURL: "redis://localhost"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
flask-version: ["3.0.0"]
python-version: ["3.8", "3.10"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install codecov redis
pip install Flask==${{ matrix.flask-version }}
pip install -r examples/fulldemo/requirements.txt
- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: 5
- name: Test & upload report to coverage
run: |
coverage run -m unittest && codecov -t ${{ secrets.CODECOV_TOKEN }}
- name: Prepare publish packge
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.flask-version == '3.0.0' && matrix.python-version == '3.8'
run: pip install -U setuptools twine wheel && python setup.py sdist bdist_wheel
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.flask-version == '3.0.0' && matrix.python-version == '3.8'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}