-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Viktor Adam
committed
Jul 25, 2021
1 parent
dd1184c
commit 4781fff
Showing
10 changed files
with
90 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Test & publish package | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install coverage coveralls | ||
pip install -r requirements.txt | ||
- name: Run tests | ||
run: | | ||
python -m coverage run --branch --source=prometheus_flask_exporter -m unittest discover -s tests -v | ||
- name: Upload coverage report | ||
if: always() && matrix.python-version == '3.9' | ||
run: | | ||
coveralls --service=github | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
integration: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- testname: gunicorn | ||
- testname: gunicorn-internal | ||
- testname: gunicorn-app-factory | ||
- testname: uwsgi | ||
- testname: uwsgi-lazy-apps | ||
- testname: wsgi | ||
- testname: connexion-pydantic | ||
- testname: restful-with-blueprints | ||
- testname: restful-return-none | ||
- testname: restplus-default-metrics | ||
- testname: flask-httpauth | ||
- testname: reload | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run integration test for ${{ matrix.testname }} | ||
run: | | ||
sh examples/${{ matrix.testname }}/run_tests.sh | ||
publish: | ||
runs-on: ubuntu-latest | ||
needs: integration | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
pip install build | ||
- name: Build package | ||
run: | | ||
python -m build | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
|
||
verify: | ||
runs-on: ubuntu-latest | ||
needs: publish | ||
steps: | ||
- name: Verify installation | ||
run: | | ||
pip install prometheus-flask-exporter |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters