RELEASE: Version 1.0 (#3)
This commit is contained in:
41
.github/workflows/ci.yml
vendored
41
.github/workflows/ci.yml
vendored
@ -6,10 +6,12 @@ on:
|
||||
- 'README.md'
|
||||
- 'LICENSE.md'
|
||||
- '.gitignore'
|
||||
- 'renovate.json'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
skip_duplicate:
|
||||
name: Skip if duplicate run
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||
@ -43,6 +45,7 @@ jobs:
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
needs: skip_duplicate
|
||||
if: ${{ needs.skip_duplicate.outputs.should_skip == 'false' }}
|
||||
runs-on: ubuntu-latest
|
||||
@ -59,6 +62,7 @@ jobs:
|
||||
run: pylint --recursive=yes .
|
||||
|
||||
test:
|
||||
name: Run unit tests
|
||||
needs: skip_duplicate
|
||||
if: ${{ needs.skip_duplicate.outputs.should_skip == 'false' }}
|
||||
runs-on: ubuntu-latest
|
||||
@ -78,3 +82,40 @@ jobs:
|
||||
run: coverage run -m py.test -v
|
||||
- name: Upload Coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
|
||||
build:
|
||||
name: Build
|
||||
needs:
|
||||
- lint
|
||||
- test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
# - name: Install dependencies
|
||||
# run: pip install -r requirements.txt && pip install -r requirements-dev.txt
|
||||
- name: Install build dependencies
|
||||
run: pip install setuptools wheel
|
||||
- name: Build wheel file
|
||||
run: python setup.py bdist_wheel
|
||||
- id: skip_check
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: whl
|
||||
path: dist/
|
||||
|
||||
publish:
|
||||
name: Publish
|
||||
needs: build
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Publish to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
|
Reference in New Issue
Block a user