forked from xtream1101/logredactor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arman Jasuja
committed
Jul 5, 2024
1 parent
4ebae38
commit 8d99fe8
Showing
6 changed files
with
87 additions
and
51 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,81 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ['*'] | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
test-pytest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
pip install tox | ||
- name: Install loggingredactor | ||
run: | | ||
pip install -e . | ||
- name: Run pytest | ||
run: tox -e py37 | ||
|
||
test-flake8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
pip install tox | ||
- name: Install loggingredactor | ||
run: | | ||
pip install -e . | ||
- name: Run flake8 | ||
run: tox -e flake8 | ||
|
||
tag: | ||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Git config | ||
run: | | ||
git config --global user.email "${{ secrets.GIT_USER_EMAIL }}" | ||
git config --global user.name "${{ secrets.GIT_USER_NAME }}" | ||
- name: Get version from setup.py | ||
id: get_version | ||
run: echo "::set-output name=version::$(python setup.py --version)" | ||
- name: Create tag | ||
run: | | ||
git tag -a ${{ steps.get_version.outputs.version }} -m "Version created by GitHub Actions" | ||
git push origin ${{ steps.get_version.outputs.version }} | ||
pypi-package: | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: pip install twine | ||
- name: Build package | ||
run: | | ||
rm -f dist/* | ||
python setup.py sdist bdist_wheel | ||
- name: Publish to PyPI | ||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USER }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: twine upload dist/* |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
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