Repository navigation
72 lines (64 loc) · 1.84 KB
/
Copy pathpythonpackage.yml
File metadata and controls
72 lines (64 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
name: Python package
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
test:
runs-on: ${{matrix.os}}
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.x"]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install --no-ansi
- name: Test with pytest
run: |
poetry run pytest
test-ppc:
runs-on: ubuntu-18.04
name: Test for PPC
steps:
- uses: actions/checkout@v1
- uses: uraimo/[email protected]
name: Run tests for PPC
id: runcmd
with:
arch: ppc64le
distro: alpine_latest
run: |
apk update
apk add python3 build-base python3-dev libffi-dev
apk add libressl-dev musl-dev
python3 -m venv .venv
./.venv/bin/pip install -U pip wheel
./.venv/bin/pip install poetry
./.venv/bin/poetry install --no-ansi
./.venv/bin/poetry run pytest
publish:
needs: [test, test-ppc]
runs-on: ubuntu-latest
if: >
github.event_name == 'push' &&
startsWith(github.event.ref, 'refs/tags')
steps:
- uses: actions/checkout@v1
- name: Build distribution
run: |
pip install wheel
pip install poetry
~/.local/bin/poetry build
- name: Publish package
uses: pypa/gh-action-pypi-publish@e777b333
with:
user: __token__
password: ${{ secrets.pypi_token }}