Update tests. #39
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
name: Lint and test | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup python π | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Checkout β¬οΈ | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Install dependencies βοΈ | |
run: | | |
pip install -U pip setuptools | |
pip install .[dev] | |
- name: Lint π | |
run: ./tests/lint.sh | |
pypi: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup python π | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Checkout β¬οΈ | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Install dependencies βοΈ | |
run: | | |
pip install -U pip setuptools | |
pip install -U twine build | |
- name: Check bundling π¦ | |
run: python -m build | |
- name: Check setup π¦ | |
run: twine check "dist/order-*.tar.gz" | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
name: test (python ${{ matrix.python-version }}) | |
steps: | |
- name: Setup Python ${{ matrix.python-version }} π | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout β¬οΈ | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Install dependencies βοΈ | |
run: | | |
pip install -U pip setuptools | |
pip install .[dev] | |
- name: Test π’ | |
run: | | |
./tests/test.sh | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup python π | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Checkout β¬οΈ | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Install dependencies βοΈ | |
run: | | |
pip install -U pip setuptools | |
pip install .[dev] | |
- name: Run coverage test π’ | |
run: | | |
pytest --cov=order --cov-report xml:coverage.xml tests | |
- name: Upload report π | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.xml | |
flags: unittests |