-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add github workflow #362
Add github workflow #362
Changes from all commits
52be116
08023e7
12fedd2
16e3565
189a6c8
fdfc056
993d991
0e4fe45
81dc4a2
5ab1f67
4cfbfee
a705623
7b4ed0c
262a444
eee463a
1f26c52
6fedc12
ec7ed05
9f40a32
6a1c951
deb8347
79ee304
30da5e4
912de0e
c6408bb
45ca178
1d846bb
063fd51
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,123 @@ | ||||||
name: main | ||||||
|
||||||
on: [push, pull_request] | ||||||
|
||||||
jobs: | ||||||
build: | ||||||
runs-on: ${{ matrix.os }} | ||||||
permissions: | ||||||
contents: read | ||||||
|
||||||
strategy: | ||||||
fail-fast: false | ||||||
matrix: | ||||||
name: [ | ||||||
"py-27", | ||||||
"py-33", | ||||||
"py-34", | ||||||
"py-35", | ||||||
"py-36", | ||||||
"py-37", | ||||||
"py-38", | ||||||
"py-39", | ||||||
"pypy-36", | ||||||
"pypy-27" | ||||||
] | ||||||
|
||||||
include: | ||||||
- name: "py-27" | ||||||
python: "2.7" | ||||||
os: ubuntu-latest | ||||||
- name: "py-33" | ||||||
python: "3.3" | ||||||
os: ubuntu-latest | ||||||
container: true | ||||||
- name: "py-34" | ||||||
python: "3.4" | ||||||
os: ubuntu-latest | ||||||
container: true | ||||||
- name: "py-35" | ||||||
python: "3.5" | ||||||
os: ubuntu-latest | ||||||
- name: "py-36" | ||||||
python: "3.6" | ||||||
os: ubuntu-latest | ||||||
- name: "py-37" | ||||||
python: "3.7" | ||||||
os: ubuntu-latest | ||||||
- name: "py-38" | ||||||
python: "3.8" | ||||||
os: ubuntu-latest | ||||||
- name: "py-39" | ||||||
python: "3.9" | ||||||
os: ubuntu-latest | ||||||
- name: "pypy-36" | ||||||
python: "pypy-3.6-v7.3.2" | ||||||
os: ubuntu-latest | ||||||
container: true | ||||||
- name: "pypy-27" | ||||||
python: "pypy-2.7.13-v7.3.2" | ||||||
os: ubuntu-latest | ||||||
container: true | ||||||
|
||||||
steps: | ||||||
- uses: actions/checkout@v2 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. v4 is the latest version of
Suggested change
|
||||||
- uses: docker://ubuntu:trusty | ||||||
if: "matrix.container" | ||||||
|
||||||
- uses: actions/cache@v2 | ||||||
with: | ||||||
path: ~/.cache/pip | ||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} | ||||||
restore-keys: | | ||||||
${{ runner.os }}-pip- | ||||||
|
||||||
|
||||||
- name: Set up Python ${{ matrix.python }} | ||||||
uses: actions/setup-python@v2 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. v5 is the latest version of
Suggested change
|
||||||
with: | ||||||
python-version: ${{ matrix.python-versions }} | ||||||
|
||||||
- name: Install dependencies | ||||||
run: | | ||||||
pip install --upgrade --force-reinstall "setuptools; python_version != '3.3'" "setuptools < 40; python_version == '3.3'" | ||||||
pip uninstall --yes six || true | ||||||
pip install --upgrade --force-reinstall --ignore-installed -e . | ||||||
pip install "pytest==4.6.9; python_version != '3.3'" "pytest==2.9.2; python_version == '3.3'" "typing; python_version < '3'" | ||||||
pip list --format=columns || pip list | ||||||
|
||||||
- name: Test | ||||||
run: | | ||||||
py.test | ||||||
echo Checking whether installation flow is not broken... | ||||||
pip uninstall --yes six || true | ||||||
pip install --ignore-installed . | ||||||
pip list --format=columns || pip list | ||||||
|
||||||
deploy: | ||||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||||||
runs-on: ubuntu-latest | ||||||
needs: [build] | ||||||
|
||||||
steps: | ||||||
- uses: actions/checkout@v2 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. v4 is the latest version of
Suggested change
|
||||||
|
||||||
- name: Set up Python | ||||||
uses: actions/setup-python@v2 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. v5 is the latest version of
Suggested change
|
||||||
with: | ||||||
python-version: "3.9" | ||||||
|
||||||
- name: Install dependencies | ||||||
run: | | ||||||
pip install wheel | ||||||
|
||||||
- name: Build package | ||||||
run: | | ||||||
python setup.py sdist bdist_wheel | ||||||
|
||||||
- name: Publish package | ||||||
uses: pypa/gh-action-pypi-publish@release/v1 | ||||||
with: | ||||||
user: __token__ | ||||||
password: ${{ secrets.PYPI_API_TOKEN }} | ||||||
|
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -1050,3 +1050,8 @@ def test_ensure_text(self): | |||||||||||
assert converted_unicode == self.UNICODE_EMOJI and isinstance(converted_unicode, str) | ||||||||||||
# PY3: bytes -> str | ||||||||||||
assert converted_binary == self.UNICODE_EMOJI and isinstance(converted_unicode, str) | ||||||||||||
|
||||||||||||
|
||||||||||||
def test_foo(): | ||||||||||||
foo = "FOO" | ||||||||||||
assert foo == "FOO" | ||||||||||||
Comment on lines
+1053
to
+1057
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this was added for debug purposes and should be removed from the final version.
Suggested change
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the other Python versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is still in progress, I will add the other Python versions.
I converted the PR to draft.