Skip to content

Commit 8e04857

Browse files
committed
Add GitHub Actions for CI Validation
This commit adds GitHub actions for CI validation Refers to SPSTRAT-293
1 parent 6a4d4f6 commit 8e04857

File tree

3 files changed

+142
-0
lines changed

3 files changed

+142
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @JAVGan @jajreidy

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release on PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: '3.9'
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install setuptools wheel twine
21+
- name: Build and publish
22+
env:
23+
TWINE_USERNAME: __token__
24+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
25+
run: |
26+
python setup.py sdist bdist_wheel
27+
twine upload dist/*

.github/workflows/tox-test.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Tox tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
linting:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Install OS packages
11+
run: |
12+
sudo apt-get -y update
13+
sudo apt-get install -y rpm
14+
sudo apt-get install -y libkrb5-dev
15+
- name: Setup Python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: 3.8
19+
- name: Install Tox
20+
run: pip install tox 'virtualenv<20.21.1'
21+
- name: Run Linting
22+
run: tox -e lint
23+
mypy:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Install OS packages
28+
run: |
29+
sudo apt-get -y update
30+
sudo apt-get install -y rpm
31+
sudo apt-get install -y libkrb5-dev
32+
- name: Setup Python
33+
uses: actions/setup-python@v2
34+
with:
35+
python-version: 3.9
36+
- name: Install Tox
37+
run: pip install tox 'virtualenv<20.21.1'
38+
- name: Run MyPy
39+
run: tox -e mypy
40+
unit-tests:
41+
runs-on: ubuntu-latest
42+
strategy:
43+
matrix:
44+
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
45+
python-version: ["3.8", "3.9", "3.10", "3.11"]
46+
steps:
47+
- uses: actions/checkout@v2
48+
- name: Set up Python ${{ matrix.python-version }}
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: ${{ matrix.python-version }}
52+
- name: Install OS packages
53+
run: |
54+
sudo apt-get -y update
55+
sudo apt-get install -y rpm
56+
sudo apt-get install -y libkrb5-dev
57+
- name: Install Tox
58+
run: pip install tox 'virtualenv<20.21.1'
59+
- name: Test on ${{ matrix.python-version }}
60+
run: tox -e "py${{ matrix.python-version }}"
61+
coverage:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v2
65+
- name: Install OS packages
66+
run: |
67+
sudo apt-get -y update
68+
sudo apt-get install -y rpm
69+
sudo apt-get install -y libkrb5-dev
70+
- name: Setup Python
71+
uses: actions/setup-python@v2
72+
with:
73+
python-version: 3.8
74+
- name: Install Tox
75+
run: pip install tox 'virtualenv<20.21.1'
76+
- name: Install pytest cov
77+
run: pip install pytest-cov
78+
- name: Run Tox
79+
run: tox -e coverage
80+
security:
81+
runs-on: ubuntu-latest
82+
steps:
83+
- uses: actions/checkout@v2
84+
- name: Install OS packages
85+
run: |
86+
sudo apt-get -y update
87+
sudo apt-get install -y rpm
88+
sudo apt-get install -y libkrb5-dev
89+
- name: Setup Python
90+
uses: actions/setup-python@v2
91+
with:
92+
python-version: 3.8
93+
- name: Install Tox
94+
run: pip install tox 'virtualenv<20.21.1'
95+
- name: Run Tox
96+
run: tox -e security
97+
docs:
98+
runs-on: ubuntu-latest
99+
steps:
100+
- uses: actions/checkout@v2
101+
- name: Install OS packages
102+
run: |
103+
sudo apt-get -y update
104+
sudo apt-get install -y rpm
105+
sudo apt-get install -y libkrb5-dev
106+
- name: Setup Python
107+
uses: actions/setup-python@v2
108+
with:
109+
python-version: 3.8
110+
- name: Install Tox
111+
run: pip install tox 'virtualenv<20.21.1'
112+
- name: Run Tox
113+
run: tox -e docs
114+

0 commit comments

Comments
 (0)