From 52be1169a59da856e92811421ffb7897f910ef6a Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Mon, 15 Nov 2021 14:45:54 -0300 Subject: [PATCH 01/28] Add github workflow, first set up python --- .github/workflows/main.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..ec2f792d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,38 @@ +name: main + +on: + push: + branches: + - master + - "[0-9]+.[0-9]+.x" + tags: + - "[0-9]+.[0-9]+.[0-9]+" + - "[0-9]+.[0-9]+.[0-9]+rc[0-9]+" + + pull_request: + branches: + - master + - "[0-9]+.[0-9]+.x" + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 30 + permissions: + contents: read + + strategy: + fail-fast: false + matrix: + python-versions: [2.7, 3.5] #,3.6, 3.7, 3.8 + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} \ No newline at end of file From 08023e74fb033b8c1229589423ddbc099e7f84cf Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Mon, 15 Nov 2021 14:52:31 -0300 Subject: [PATCH 02/28] Add a sample test to run workflow --- test_six.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test_six.py b/test_six.py index 076b3eb0..eaad1fc6 100644 --- a/test_six.py +++ b/test_six.py @@ -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" From 12fedd20fa3656cd41dbc4c1979dbf3a7c9dce3d Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Mon, 15 Nov 2021 15:00:53 -0300 Subject: [PATCH 03/28] Change branch: master to main --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ec2f792d..563233b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,7 @@ name: main on: push: branches: - - master + - main - "[0-9]+.[0-9]+.x" tags: - "[0-9]+.[0-9]+.[0-9]+" @@ -11,7 +11,7 @@ on: pull_request: branches: - - master + - main - "[0-9]+.[0-9]+.x" jobs: From 16e3565cb03e555c65dde1edfbcd0cd5d2811fe5 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Mon, 15 Nov 2021 15:09:17 -0300 Subject: [PATCH 04/28] Remove travis.yml --- .travis.yml | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 890f584a..00000000 --- a/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ -os: linux -dist: focal -language: python -python: -- 2.7 -- 3.5 -- 3.6 -- 3.7 -- 3.8 -- &mainstream_python 3.9 -- nightly -- pypy3 -install: -- 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'" -- &py_pkg_list pip list --format=columns || pip list -script: -- py.test -- echo Checking whether installation flow is not broken... -- pip uninstall --yes six || true -- pip install --ignore-installed . -- *py_pkg_list -jobs: - fast_finish: true - include: - - python: 3.3 - dist: trusty - - python: 3.4 - dist: trusty - - python: pypy - dist: trusty - - stage: upload new version of python package to PYPI (only for tagged commits) - python: *mainstream_python - install: skip - script: skip - deploy: - provider: pypi - on: - tags: true - all_branches: true - python: *mainstream_python - user: __token__ - distributions: "sdist bdist_wheel" - password: - secure: "F83KFmQnpBcR/BD7tBjJcmchvvoxYjIB0EDmDKEM+Rq1SJUH0qtYZlMJ0H4S8sTeY4+h26Ssfg5+oe9SqS5AkEMLFVM2lDcFtIXNR9bIvsXjkKsdxIWZJJ+Vl7EmW+ND/oj9IWnHOvaPr6F1YQqOuP2LfrDsoZ+4wo4X+UCC8xCGCaAIliPIt6y7U3ENeCQJTwUc93eDMZrEROmWAwsxF54a13CIkbTWe+S3iEp949MaNBWx2f9XNi7Gidk2gKUKordK0MXiO7+DcrQdiCAtPryqqNKR/JjZ66P9eK1A2VWyk65/5E8+OJeexuSlHGg52HKoXU2BPIkzgcaSjt79WQKVKJzYi2iD0Bd/9/RKrnq8+GVd0yT5IJV5OhwcpT0ScPs/9pAZ1mSEufx1FtXN61ujs2VEuleSQAWBiNGXsRQNCzVxgfatkUTNMjB0jxUzNay5CFrMlo5AVWBcdByhUto3szV/lxLj7arM48GHXaf+5MXhaELU8L2pTpJoQ8Rdj+Tx5HbhJ+wWF6EyT919prB2/6fM4d/MHIuHfJkCasYZSvhamGnTBzxxH9Fv7l18FyrBXF+Rz65mXVkUlxFMICSMWRJWEb4I2KWK1bsxCFy+o38TMeije+1nbvKVRKbLMn6mbXfBb/wfLTNogHFXrlR5VcugcP079dqR9O3iV4M=" - -cache: - pip: true -after_failure: -- echo "Here's a list of installed Python packages:" -- *py_pkg_list From 189a6c85870241c9a1a7f5361c5810e2a3877665 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Mon, 15 Nov 2021 15:14:27 -0300 Subject: [PATCH 05/28] Fix github workflow --- .github/workflows/main.yml | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 563233b2..086aa701 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,38 +1,17 @@ name: main -on: - push: - branches: - - main - - "[0-9]+.[0-9]+.x" - tags: - - "[0-9]+.[0-9]+.[0-9]+" - - "[0-9]+.[0-9]+.[0-9]+rc[0-9]+" - - pull_request: - branches: - - main - - "[0-9]+.[0-9]+.x" +on: [push, pull_request] jobs: build: runs-on: ubuntu-latest - timeout-minutes: 30 - permissions: - contents: read - strategy: - fail-fast: false matrix: python-versions: [2.7, 3.5] #,3.6, 3.7, 3.8 steps: - uses: actions/checkout@v2 - with: - fetch-depth: 0 - persist-credentials: false - - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: - python-version: ${{ matrix.python }} \ No newline at end of file + python-version: ${{ matrix.python-versions }} From fdfc056fcd94d1bda75d9f3efb6bf7f9d0e64fc4 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Mon, 15 Nov 2021 16:33:28 -0300 Subject: [PATCH 06/28] Add test step --- .github/workflows/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 086aa701..552adacf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,3 +15,11 @@ jobs: uses: actions/setup-python@v2 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'" + From 993d99140076ee1c46d8db4f9a71289fc527b6c8 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Mon, 15 Nov 2021 16:37:51 -0300 Subject: [PATCH 07/28] Add test step --- .github/workflows/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 552adacf..e7cc8eda 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,4 +22,12 @@ jobs: 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 \ No newline at end of file From 0e4fe45074e5b2cc0bd033c4d8e00631a35a52d1 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Mon, 15 Nov 2021 17:52:30 -0300 Subject: [PATCH 08/28] Matrix refactor --- .github/workflows/main.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e7cc8eda..e0726ead 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,14 +4,27 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: - python-versions: [2.7, 3.5] #,3.6, 3.7, 3.8 + name: [ + "py-27", + "py-35", + ] + + include: + - name: "py-27" + python: "2.7" + os: ubuntu-latest + + - name: "py-35" + python: "3.5" + os: ubuntu-18.04 + steps: - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-versions }} From 81dc4a27e5f95f1af1bcff8df66b17b35567d283 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Mon, 15 Nov 2021 17:54:30 -0300 Subject: [PATCH 09/28] Fix matrix refactor --- .github/workflows/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e0726ead..3abb4d6e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,6 +6,7 @@ jobs: build: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: name: [ "py-27", @@ -14,12 +15,11 @@ jobs: include: - name: "py-27" - python: "2.7" - os: ubuntu-latest - + python: "2.7" + os: ubuntu-latest - name: "py-35" - python: "3.5" - os: ubuntu-18.04 + python: "3.5" + os: ubuntu-18.04 steps: From 5ab1f67bb30e65da0cdb393ca660195e75ff7338 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Fri, 19 Nov 2021 09:51:19 -0300 Subject: [PATCH 10/28] Add deploy and try ubuntu14.04 --- .github/workflows/main.yml | 42 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3abb4d6e..529a0d83 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,19 +11,27 @@ jobs: name: [ "py-27", "py-35", + "py-33", + "py-39", ] include: - name: "py-27" python: "2.7" os: ubuntu-latest + - name: "py-33" + python: "3.3" + os: ubuntu-latest + container: ubuntu:14:04 - name: "py-35" python: "3.5" os: ubuntu-18.04 - steps: - uses: actions/checkout@v2 + if: ${{ matrix.container }} + - uses: docker://ubuntu/${{ matrix.container }} + - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v2 with: @@ -43,4 +51,34 @@ jobs: echo Checking whether installation flow is not broken... pip uninstall --yes six || true pip install --ignore-installed . - pip list --format=columns || pip list \ No newline at end of file + 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 + + - name: Set up Python + uses: actions/setup-python@v2 + 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 }} + # https://github.com/pypa/gh-action-pypi-publish + # https://docs.github.com/en/actions/security-guides/encrypted-secrets + # https://pypi.org/help/#apitoken From 4cfbfee483f9928c76a83342709c8f4c0c4360a7 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Fri, 19 Nov 2021 10:00:11 -0300 Subject: [PATCH 11/28] Fix if container --- .github/workflows/main.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 529a0d83..356eda07 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,9 +10,8 @@ jobs: matrix: name: [ "py-27", - "py-35", "py-33", - "py-39", + "py-35", ] include: @@ -29,8 +28,10 @@ jobs: steps: - uses: actions/checkout@v2 - if: ${{ matrix.container }} - - uses: docker://ubuntu/${{ matrix.container }} + + - name: Set up container + if: ${{ matrix.container }} + uses: docker://ubuntu/${{ matrix.container }} - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v2 @@ -82,3 +83,5 @@ jobs: # https://github.com/pypa/gh-action-pypi-publish # https://docs.github.com/en/actions/security-guides/encrypted-secrets # https://pypi.org/help/#apitoken + # https://github.com/sanitizers/octomachinery/blob/master/.github/workflows/publish-to-test-pypi.yml + From a7056236cad8fc3f190524a84a118ca2c55fb5a6 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Fri, 19 Nov 2021 10:02:10 -0300 Subject: [PATCH 12/28] Fix access to matrix.container --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 356eda07..29b11d84 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up container - if: ${{ matrix.container }} + if: "matrix.container" uses: docker://ubuntu/${{ matrix.container }} - name: Set up Python ${{ matrix.python }} From 7b4ed0cdc536c7fdd1115dd7635c919924cb96a7 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Wed, 24 Nov 2021 08:53:40 -0300 Subject: [PATCH 13/28] Add image variable to matrix --- .github/workflows/main.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 29b11d84..2c4a699c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,9 @@ on: [push, pull_request] jobs: build: runs-on: ${{ matrix.os }} + permissions: + contents: read + strategy: fail-fast: false matrix: @@ -21,7 +24,8 @@ jobs: - name: "py-33" python: "3.3" os: ubuntu-latest - container: ubuntu:14:04 + container: true + image: ubuntu:14:04 - name: "py-35" python: "3.5" os: ubuntu-18.04 @@ -31,7 +35,7 @@ jobs: - name: Set up container if: "matrix.container" - uses: docker://ubuntu/${{ matrix.container }} + uses: docker://ubuntu/${{ matrix.image }} - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v2 From 262a44430e06e0049b2e4e3b8152ddb0b8521e93 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Wed, 24 Nov 2021 08:57:33 -0300 Subject: [PATCH 14/28] Add image variable to all matrix items --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2c4a699c..66d88353 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,6 +21,7 @@ jobs: - name: "py-27" python: "2.7" os: ubuntu-latest + image: ubuntu-latest - name: "py-33" python: "3.3" os: ubuntu-latest @@ -29,6 +30,7 @@ jobs: - name: "py-35" python: "3.5" os: ubuntu-18.04 + image: ubuntu-latest steps: - uses: actions/checkout@v2 From eee463a36505a05b95c1b9ed77651a4ea7393172 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Wed, 24 Nov 2021 09:15:51 -0300 Subject: [PATCH 15/28] Replace expresion for string in docker uses --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 66d88353..bba75627 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,7 @@ jobs: - name: Set up container if: "matrix.container" - uses: docker://ubuntu/${{ matrix.image }} + uses: docker://ubuntu/ubuntu:14:04 - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v2 From 1f26c522feda41e680bc88ed781e841ddd8d931b Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Wed, 1 Dec 2021 08:04:23 -0300 Subject: [PATCH 16/28] Fix uses docker image --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bba75627..f17f1d34 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,7 @@ jobs: - name: Set up container if: "matrix.container" - uses: docker://ubuntu/ubuntu:14:04 + uses: docker://library/ubuntu/ubuntu:14:04 - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v2 From 6fedc12fc8569ffef8287ad848b21bb838f87464 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Sat, 18 Dec 2021 11:33:51 -0300 Subject: [PATCH 17/28] Use container instead of uses docker --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f17f1d34..bf0826ea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,7 @@ jobs: - name: Set up container if: "matrix.container" - uses: docker://library/ubuntu/ubuntu:14:04 + container: ubuntu:14:04 - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v2 From ec7ed057be7513da4b095bfcb85857f571f94b36 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Sat, 18 Dec 2021 11:45:51 -0300 Subject: [PATCH 18/28] Uses docker ubuntu trusty in setup container --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bf0826ea..4e3a649c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,7 @@ jobs: - name: Set up container if: "matrix.container" - container: ubuntu:14:04 + uses: docker://ubuntu:trusty - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v2 From 9f40a327aa73aef676584c5d6111a5aaa03f2978 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Sat, 18 Dec 2021 11:57:57 -0300 Subject: [PATCH 19/28] Remove images from matrix and try to fix if --- .github/workflows/main.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e3a649c..9006f910 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,22 +21,19 @@ jobs: - name: "py-27" python: "2.7" os: ubuntu-latest - image: ubuntu-latest - name: "py-33" python: "3.3" os: ubuntu-latest - container: true - image: ubuntu:14:04 + container: "true" - name: "py-35" python: "3.5" - os: ubuntu-18.04 - image: ubuntu-latest + os: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up container - if: "matrix.container" + if: "matrix.container == "true" uses: docker://ubuntu:trusty - name: Set up Python ${{ matrix.python }} From 6a1c951fbc173271da2f1ee30eed330a860f5bd2 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Sat, 18 Dec 2021 11:58:37 -0300 Subject: [PATCH 20/28] Fix if, I forgot double quote --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9006f910..b2161ed3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up container - if: "matrix.container == "true" + if: "matrix.container == "true"" uses: docker://ubuntu:trusty - name: Set up Python ${{ matrix.python }} From deb83473925ae6cf5bbf22cd93bfaeb33f14775a Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Sat, 18 Dec 2021 11:59:32 -0300 Subject: [PATCH 21/28] Replace double quotes for single quotes --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b2161ed3..a8e9572c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up container - if: "matrix.container == "true"" + if: "matrix.container == 'true'" uses: docker://ubuntu:trusty - name: Set up Python ${{ matrix.python }} From 79ee304e9381ecb6d72208ec8d373f08ae5d0d5f Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Sat, 18 Dec 2021 12:09:46 -0300 Subject: [PATCH 22/28] Move uses docker at all steps level, and use expressions --- .github/workflows/main.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a8e9572c..58334fe6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,17 +24,15 @@ jobs: - name: "py-33" python: "3.3" os: ubuntu-latest - container: "true" + container: true - name: "py-35" python: "3.5" os: ubuntu-latest steps: - uses: actions/checkout@v2 - - - name: Set up container - if: "matrix.container == 'true'" - uses: docker://ubuntu:trusty + - uses: docker://ubuntu:trusty + if: ${{ matrix.container }} - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v2 From 30da5e47770c7a33e61b38c443b03db5324114b4 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Sat, 18 Dec 2021 12:13:14 -0300 Subject: [PATCH 23/28] Test without expresion --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 58334fe6..42291f09 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: steps: - uses: actions/checkout@v2 - uses: docker://ubuntu:trusty - if: ${{ matrix.container }} + if: "matrix.container" - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v2 From 912de0e56c134fca73bbef1a3c2fe3a7c9d1c64a Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Sat, 18 Dec 2021 12:36:33 -0300 Subject: [PATCH 24/28] Try pypy3.6 --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 42291f09..2868856d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,6 +28,10 @@ jobs: - name: "py-35" python: "3.5" os: ubuntu-latest + - name: "pypy-36" + python: "pypy-3.6-v7.3.2" + os: ubuntu-latest + container: true steps: - uses: actions/checkout@v2 From c6408bb08a95a6894e0914cefe8a26bd595a2a4b Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Sat, 18 Dec 2021 12:40:20 -0300 Subject: [PATCH 25/28] Add pypy 2.7.13 --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2868856d..43620c43 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,6 +32,10 @@ jobs: 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 From 45ca178a338409db16d2563225d9484ea744fc94 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Sat, 18 Dec 2021 13:41:51 -0300 Subject: [PATCH 26/28] Try pip cache --- .github/workflows/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 43620c43..54f7d643 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,6 +42,14 @@ jobs: - 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 with: From 1d846bbd1a641d3f569e6cad67888b184ed77a01 Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Sat, 18 Dec 2021 13:45:45 -0300 Subject: [PATCH 27/28] Add sample matrix attribute to test cache --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 54f7d643..c255b59a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,6 +35,7 @@ jobs: - name: "pypy-27" python: "pypy-2.7.13-v7.3.2" os: ubuntu-latest + foo: false container: true steps: From 063fd51a73068230191f9ecb6c7d6b745f97778c Mon Sep 17 00:00:00 2001 From: Cristian Vera Date: Sat, 18 Dec 2021 15:52:39 -0300 Subject: [PATCH 28/28] Add other python versions --- .github/workflows/main.yml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c255b59a..dea5324a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,14 @@ jobs: name: [ "py-27", "py-33", + "py-34", "py-35", + "py-36", + "py-37", + "py-38", + "py-39", + "pypy-36", + "pypy-27" ] include: @@ -25,9 +32,25 @@ jobs: 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 @@ -35,7 +58,6 @@ jobs: - name: "pypy-27" python: "pypy-2.7.13-v7.3.2" os: ubuntu-latest - foo: false container: true steps: @@ -98,8 +120,4 @@ jobs: with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} - # https://github.com/pypa/gh-action-pypi-publish - # https://docs.github.com/en/actions/security-guides/encrypted-secrets - # https://pypi.org/help/#apitoken - # https://github.com/sanitizers/octomachinery/blob/master/.github/workflows/publish-to-test-pypi.yml