Skip to content

Fixing CI integration #126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 21 additions & 26 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,29 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- uses: actions/checkout@master

- name: Install Poetry
uses: dschep/install-poetry-action@v1.3
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.10'

- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
with:
path: ~/.virtualenvs
key: poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ hashFiles('**/poetry.lock') }}
- uses: docker-practice/actions-setup-docker@master

- name: Set Poetry config
run: |
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.virtualenvs
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -

- name: Install Dependencies
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
- name: Install Dev requirements
run: |
pip install -U setuptools wheel
pip install -r dev_requirements.txt

- name: Publish to PyPI
if: github.event_name == 'release'
run: |
poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }} --build
- name: Install Dependencies
run: |
poetry install

- name: Publish to PyPI
if: github.event_name == 'release'
run: |
poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }} --build
22 changes: 12 additions & 10 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ on:
pull_request:
push:
branches:
- master
- main

jobs:
pytest:
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
os: [ ubuntu-latest ]
python-version: [ '3.8', '3.9', '3.10' ]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
USING_COVERAGE: "3.9"
USING_COVERAGE: "3.10"
USING_COVERAGE_OS: "ubuntu-latest"

runs-on: ${{ matrix.os }}
name: os ${{ matrix.os }} python ${{ matrix.python-version }} Linting, testing, and compliance
runs-on: "ubuntu-latest"
name: python ${{ matrix.python-version }} Linting, testing, and compliance
steps:
- uses: actions/checkout@master

Expand All @@ -31,16 +31,18 @@ jobs:
run: |
curl -sSL https://install.python-poetry.org | python3 -

- name: Install Tox
- name: Install Dev requirements
run: |
pip3 install -r ./utils/test-requirements.txt
pip install -U setuptools wheel
pip install -r dev_requirements.txt

- name: Run tox
run: |
tox
TST_RUNNER_USE_RDB=0 tox

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2
if: contains(env.USING_COVERAGE, matrix.python-version)
with:
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ poetry run flake8
A test suite is provided, and can be run with:

```sh
$ pip3 install -r ./utils/test-requirements.txt
$ pip3 install -r ./dev_requirements.txt
$ tox
```

Expand Down
17 changes: 17 additions & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
click==8.0.4
black==22.3.0
flake8==4.0.1
flynt~=0.69.0
isort==5.10.1
mock==4.0.3
packaging>=20.4
pytest==7.2.0
pytest-timeout==2.0.1
pytest-asyncio>=0.16.0
tox==3.24.4
tox-docker==4.0.0a2
invoke==1.6.0
pytest-cov>=3.0.0
vulture>=2.3.0
ujson>=4.2.0
wheel>=0.30.0
Loading