Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fgregg committed Sep 26, 2024
1 parent 06a5dfd commit 105d339
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 99 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=160
extend-ignore = E203
29 changes: 11 additions & 18 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install .
pip install -r requirements.txt
pip install .[dev]
- name: flake8
run: flake8 dedupe tests benchmarks/benchmarks
run: flake8 usaddress tests
- name: isort
if: always()
run: isort --check-only .
Expand Down Expand Up @@ -47,25 +46,22 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e .
- name: Install test dependencies
run: pip install -r requirements.txt
pip install .[dev]
- name: pytest
run: pytest
- name: Code Coverage
uses: codecov/codecov-action@v4
env:
OS: ${{ matrix.os }}
PYTHON: '3.12'
with:
env_vars: OS,PYTHON

deploy:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
needs: [test, lint]

runs-on: ubuntu-latest

name: Upload release to PyPI
environment:
name: pypi
url: https://pypi.org/p/usaddress
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -78,8 +74,5 @@ jobs:
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
repos:
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/pycqa/flake8
rev: "7.1.0"
hooks:
- id: flake8
args: [--config=.flake8]
51 changes: 0 additions & 51 deletions .travis.yml

This file was deleted.

30 changes: 0 additions & 30 deletions appveyor.yml

This file was deleted.

0 comments on commit 105d339

Please sign in to comment.