-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (39 loc) · 1.47 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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 }}