Skip to content

Commit e74ed36

Browse files
authored
Merge pull request #21 from digitronik/os_support
[RFR] check for linux, win, mac
2 parents 75ee187 + 6ee3077 commit e74ed36

File tree

2 files changed

+62
-24
lines changed

2 files changed

+62
-24
lines changed

.github/workflows/main.yml

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,41 @@ name: Link Status
33
on: [push, pull_request]
44

55
jobs:
6-
build:
7-
runs-on: ubuntu-16.04
6+
pre-commit:
7+
name: Pre-Commit Checks
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout to master
11+
uses: actions/checkout@master
12+
13+
- name: Setup python
14+
uses: actions/setup-python@v1
15+
with:
16+
python-version: '3.7'
17+
architecture: 'x64'
18+
19+
- name: Pre-Commit Checks
20+
run: |
21+
python -m pip install pre-commit
22+
pre-commit run -a
23+
24+
- name: Analysis (git diff)
25+
if: failure()
26+
run: git diff
27+
28+
tests:
29+
name: Test-${{ matrix.os }}-Py${{ matrix.python-version }}
30+
needs: pre-commit
31+
runs-on: ${{ matrix.os }}
832
strategy:
933
matrix:
34+
os: [ubuntu-latest, windows-latest, macos-latest]
1035
python-version: [ '3.6', '3.7' ]
11-
name: Python ${{ matrix.python-version }}
1236
steps:
1337
- name: Checkout to master
1438
uses: actions/checkout@master
1539

16-
- name: Setup python
40+
- name: Setup Python-${{ matrix.python-version }}
1741
uses: actions/setup-python@v1
1842
with:
1943
python-version: ${{ matrix.python-version }}
@@ -24,25 +48,5 @@ jobs:
2448
python -m pip install .
2549
python -m pip install -Ur dev-requirements.txt
2650
27-
- name: Pre-Commit
28-
run: pre-commit run -a
29-
30-
- name: Analysis (git diff)
31-
if: failure()
32-
run: git diff
33-
3451
- name: Unit Tests
3552
run: py.test tests -v
36-
37-
- name: Build Package
38-
if: matrix.python-version == '3.7' && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
39-
run: |
40-
python -m pip install --upgrade setuptools wheel
41-
python setup.py sdist bdist_wheel
42-
43-
- name: Deploy to PyPi
44-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
45-
uses: pypa/gh-action-pypi-publish@master
46-
with:
47-
user: __token__
48-
password: ${{ secrets.pypi_linkstatus }}

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish linkstatus to PyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- '*'
9+
10+
jobs:
11+
build-and-publish:
12+
name: Build and publish Python 🐍 distributions to PyPI
13+
runs-on: ubuntu-18.04
14+
steps:
15+
- name: Checkout to master
16+
uses: actions/checkout@master
17+
18+
- name: Setup python
19+
uses: actions/setup-python@v1
20+
with:
21+
python-version: '3.7'
22+
architecture: 'x64'
23+
24+
- name: Build Package
25+
run: |
26+
python -m pip install --upgrade setuptools wheel
27+
python setup.py sdist bdist_wheel
28+
29+
- name: Deploy to PyPi
30+
if: startsWith(github.event.ref, 'refs/tags')
31+
uses: pypa/gh-action-pypi-publish@master
32+
with:
33+
user: __token__
34+
password: ${{ secrets.pypi_linkstatus }}

0 commit comments

Comments
 (0)