Skip to content

Commit 860fdbb

Browse files
committed
Merge branch 'master' of github.com:marian-code/ssh-utilities
2 parents 9b4e7e5 + 87f1836 commit 860fdbb

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python package
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
- release
11+
pull_request:
12+
branches:
13+
- master
14+
- release
15+
workflow_dispatch:
16+
17+
jobs:
18+
build:
19+
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
matrix:
23+
os: [macos-latest, ubuntu-latest]
24+
include:
25+
- os: macos-latest
26+
TARGET: x86_64-apple-darwin
27+
COMPILER: clang
28+
LINKER: clang
29+
30+
- os: ubuntu-latest
31+
TARGET: x86_64-unknown-linux-musl
32+
COMPILER: gcc
33+
LINKER: gcc
34+
python-version: [3.6, 3.7, 3.8, 3.9]
35+
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Set up Python ${{ matrix.python-version }}
39+
uses: actions/setup-python@v2
40+
with:
41+
python-version: ${{ matrix.python-version }}
42+
- name: Install dependencies
43+
run: |
44+
python --version
45+
python -m pip install --upgrade pip
46+
pip install coverage
47+
pip install coveralls
48+
pip install -r docs/requirements.txt
49+
- name: Setup ssh
50+
if: matrix.os == 'ubuntu-latest'
51+
run: |
52+
echo "${USER}:12345678" | sudo chpasswd
53+
- name: Install ssh-utilities
54+
run: |
55+
pip install .
56+
- name: test with unittest and collect coverage data
57+
run: |
58+
coverage run -m unittest discover
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
COVERALLS_PARALLEL: true
62+
coveralls:
63+
runs-on: ubuntu-latest
64+
needs:
65+
- build
66+
if: success()
67+
container: python:3-slim
68+
steps:
69+
- name: Submit to coveralls
70+
run: |
71+
pip install --upgrade coveralls
72+
coveralls --finish
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
deploy:
76+
runs-on: ubuntu-latest
77+
needs:
78+
- build
79+
- coveralls
80+
if: success()
81+
steps:
82+
- name: Publish a Python distribution to PyPI
83+
if: github.ref == 'refs/heads/release' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
84+
uses: pypa/gh-action-pypi-publish@master
85+
with:
86+
skip_existing: true
87+
verbose: true
88+
user: __token__
89+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)