Skip to content

Commit

Permalink
fix: Fix parameter expansion not to override empty PYTHON_VERSIONS
Browse files Browse the repository at this point in the history
Also don't try to test on multiple Python versions in CI.
Also try to fix encoding/decoding errors on Windows,
but there's ALWAYS an error on Windows,
I DON'T KNOW WHAT'S WRONG WITH IT,
CAN'T IT READ UTF8 FOR CI'S SAKE.

PR #11: pawamoy/copier-poetry#11
  • Loading branch information
pawamoy authored Mar 11, 2021
1 parent 452b6b7 commit 0837d9c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,25 @@ defaults:
run:
shell: bash

env:
LANG: "en_US.utf-8"
LC_ALL: "en_US.utf-8"
POETRY_VIRTUALENVS_IN_PROJECT: "true"
PYTHONIOENCODING: "UTF-8"
PYTHON_VERSIONS: ""

jobs:

tests:

strategy:
max-parallel: 6
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.6,3.7,3.8]
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.6,3.7,3.8,3.9]

runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.os == 'windows-latest' }}
continue-on-error: ${{ matrix.os != 'ubuntu-latest' }}

steps:
- name: Checkout
Expand Down Expand Up @@ -52,7 +59,7 @@ jobs:
- name: Set up the project
run: |
pip install poetry safety copier invoke
pip install poetry safety copier
poetry config virtualenvs.in-project true
- name: Run the test suite
Expand Down
2 changes: 1 addition & 1 deletion project/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ exclude = ["tests/fixtures"]
"-A001", # redundant with W0622 (builtin override), which is more precise about line number
"-D105", # missing docstring in magic method
"-D212", # multi-line docstring summary should start at the first line
"-E203", # whitespace before ‘:’ (incompatible with Black)
"-E203", # whitespace before ':' (incompatible with Black)
"-F821", # redundant with E0602 (undefined variable)
"-Q000", # black already deals with quoting
"-S101", # use of assert
Expand Down
2 changes: 1 addition & 1 deletion project/scripts/multirun.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e

PYTHON_VERSIONS="${PYTHON_VERSIONS:-3.6 3.7 3.8 3.9}"
PYTHON_VERSIONS="${PYTHON_VERSIONS-3.6 3.7 3.8 3.9}"

if [ -n "${PYTHON_VERSIONS}" ]; then
for python_version in ${PYTHON_VERSIONS}; do
Expand Down
2 changes: 1 addition & 1 deletion project/scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e

PYTHON_VERSIONS="${PYTHON_VERSIONS:-3.6 3.7 3.8 3.9}"
PYTHON_VERSIONS="${PYTHON_VERSIONS-3.6 3.7 3.8 3.9}"

install_with_pipx() {
if ! command -v "$1" &>/dev/null; then
Expand Down
2 changes: 1 addition & 1 deletion tests/test_generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ echo
copier -f "${template}" "${output}" \
-d project_name="Pawamoy Testing" \
-d project_description='Testing this great template' \
-d author_fullname="Timothée Mazzucotelli" \
-d author_fullname="Timothee Mazzucotelli" \
-d author_username="pawamoy" \
-d author_email="[email protected]"
cd "${output}"
Expand Down

0 comments on commit 0837d9c

Please sign in to comment.