Skip to content

Commit

Permalink
Merge pull request #4 from jacobsvante/main
Browse files Browse the repository at this point in the history
Merge upstream to 0.9.0
  • Loading branch information
merit-rluk authored Mar 9, 2023
2 parents b15b6f7 + 9d7bdb3 commit 036997a
Show file tree
Hide file tree
Showing 52 changed files with 2,651 additions and 1,350 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 88
extend-ignore = E203,E501
34 changes: 34 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: cd
on:
push:
branches: [main]

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: python
package-name: netsuite
bump-minor-pre-major: true
cd:
runs-on: ubuntu-latest
needs: [release-please]
if: needs.release-please.outputs.release_created
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.10'
architecture: x64
- uses: abatilo/actions-poetry@v2.1.4
with:
poetry-version: '1.1.13'
- run: poetry build
- run: poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: ci

on:
push:
branches: [main]
pull_request:

jobs:
unittests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10', '3.9', '3.8', '3.7']
extras: ['', all, soap_api, orjson, cli]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '${{ matrix.python-version }}'
architecture: x64
- uses: abatilo/actions-poetry@v2.1.4
with:
poetry-version: '1.1.13'
- run: poetry install --extras ${{ matrix.extras }}
if: matrix.extras != ''
- run: poetry install
if: matrix.extras == ''
- run: poetry run pytest -v

style:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
extras: [all]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '${{ matrix.python-version }}'
architecture: x64
- uses: abatilo/actions-poetry@v2.1.4
with:
poetry-version: '1.1.13'
- run: poetry install --extras ${{ matrix.extras }}
- run: poetry run flake8
- run: poetry run mypy --ignore-missing-imports .
- run: poetry run isort --check --diff .
- run: poetry run black --check --diff .
24 changes: 24 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: codecov

on:
push:
branches: [main]
pull_request:

jobs:
code_coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.10'
architecture: x64
- uses: abatilo/actions-poetry@v2.1.4
with:
poetry-version: '1.1.13'
- run: poetry install --extras all
- run: poetry run pytest --cov=netsuite --cov-report=xml --cov-report=term
- uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
23 changes: 23 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: docs
on:
push:
branches: [main]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.9'
architecture: x64
- uses: abatilo/actions-poetry@v2.1.4
with:
poetry-version: '1.1.13'
- run: poetry install --extras all
- run: poetry run mkdocs build
- uses: peaceiris/actions-gh-pages@v3.7.3
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
publish_dir: ./site
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
/Pipfile.lock
/.mypy*
/.pytest_cache
/poetry.lock
.DS_Store
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
exclude: '{{project_slug}}'

default_language_version:
python: python3

repos:
- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.960
hooks:
- id: mypy
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"python.formatting.provider": "black",
"files.exclude": {
"poetry.lock": true
}
}
Loading

0 comments on commit 036997a

Please sign in to comment.