-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* pypi-packaging: install python build Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> * pypi-packaging: Rename open feature python package Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> * pypi-packaging: Add code coverage to pipeline Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> * pypi-packaging: Update actions to match other sdks Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> * pypi-packaging: Update readme with relevant badges Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> * pypi-packaging: Update readme with relevant badges Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> * pypi-packaging: Fix merge pipeline to add all linting and tests Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> * pypi-packaging: Use python 3.10 in release step Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> * pypi-packaging: Use python 3.10 in requirements.txt Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com> Signed-off-by: Andrew Helsby <ajhelsby@hotmail.com>
- Loading branch information
Showing
9 changed files
with
137 additions
and
47 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: "Lint PR" | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
main: | ||
name: Validate PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: PR | ||
|
||
on: | ||
pull_request: | ||
branches: [ master, main ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
container: [ "python:3.8", "python:3.9", "python:3.10" ] | ||
container: | ||
image: ${{ matrix.container }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache virtualenvironment | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.venv | ||
key: ${{ hashFiles('requirements.txt', 'requirements-dev.txt') }} | ||
|
||
- name: Upgrade pip | ||
run: pip install --upgrade pip | ||
|
||
- name: Create and activate Virtualenv | ||
run: | | ||
pip install virtualenv | ||
[ ! -d ".venv" ] && virtualenv .venv | ||
. .venv/bin/activate | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: python | ||
|
||
- name: Install dependencies | ||
run: pip install -r requirements-dev.txt | ||
|
||
- name: Run black formatter check | ||
run: black --check . | ||
|
||
- name: Run flake8 formatter check | ||
run: flake8 . | ||
|
||
- name: Run isort formatter check | ||
run: isort . | ||
|
||
- name: Test with pytest | ||
run: coverage run --omit="*/test*" -m pytest | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@e0fbd592d323cb2991fb586fdd260734fcb41fcb | ||
with: | ||
flags: unittests # optional | ||
name: coverage # optional | ||
fail_ci_if_error: true # optional (default = false) | ||
verbose: true # optional (default = false) | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ black | |
pip-tools | ||
pre-commit | ||
flake8 | ||
pytest-mock | ||
pytest-mock | ||
coverage |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# | ||
# This file is autogenerated by pip-compile with python 3.10 | ||
# To update, run: | ||
# | ||
# pip-compile requirements.in | ||
# |