-
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.
Merge pull request #1 from release-engineering/ghactions
Add GitHub Actions
- Loading branch information
Showing
4 changed files
with
143 additions
and
1 deletion.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 @@ | ||
* @JAVGan @jajreidy |
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,27 @@ | ||
name: Release on PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* |
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,114 @@ | ||
name: Tox tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install OS packages | ||
run: | | ||
sudo apt-get -y update | ||
sudo apt-get install -y rpm | ||
sudo apt-get install -y libkrb5-dev | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Tox | ||
run: pip install tox 'virtualenv<20.21.1' | ||
- name: Run Linting | ||
run: tox -e lint | ||
mypy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install OS packages | ||
run: | | ||
sudo apt-get -y update | ||
sudo apt-get install -y rpm | ||
sudo apt-get install -y libkrb5-dev | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install Tox | ||
run: pip install tox 'virtualenv<20.21.1' | ||
- name: Run MyPy | ||
run: tox -e mypy | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install OS packages | ||
run: | | ||
sudo apt-get -y update | ||
sudo apt-get install -y rpm | ||
sudo apt-get install -y libkrb5-dev | ||
- name: Install Tox | ||
run: pip install tox 'virtualenv<20.21.1' | ||
- name: Test on ${{ matrix.python-version }} | ||
run: tox -e "py${{ matrix.python-version }}" | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install OS packages | ||
run: | | ||
sudo apt-get -y update | ||
sudo apt-get install -y rpm | ||
sudo apt-get install -y libkrb5-dev | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Tox | ||
run: pip install tox 'virtualenv<20.21.1' | ||
- name: Install pytest cov | ||
run: pip install pytest-cov | ||
- name: Run Tox | ||
run: tox -e coverage | ||
security: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install OS packages | ||
run: | | ||
sudo apt-get -y update | ||
sudo apt-get install -y rpm | ||
sudo apt-get install -y libkrb5-dev | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Tox | ||
run: pip install tox 'virtualenv<20.21.1' | ||
- name: Run Tox | ||
run: tox -e security | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install OS packages | ||
run: | | ||
sudo apt-get -y update | ||
sudo apt-get install -y rpm | ||
sudo apt-get install -y libkrb5-dev | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Tox | ||
run: pip install tox 'virtualenv<20.21.1' | ||
- name: Run Tox | ||
run: tox -e docs | ||
|
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