Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
amoffat committed Feb 8, 2023
1 parent f5e7592 commit 58efe95
Show file tree
Hide file tree
Showing 11 changed files with 747 additions and 641 deletions.
82 changes: 41 additions & 41 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,50 +51,50 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.8, 3.9, 3.10]
use-select: [0, 1]
lang: [C, en_US.UTF-8]

steps:
- uses: actions/checkout@v2

- uses: actions/cache@v2
name: Cache pip directory
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-3.8

- uses: actions/cache@v2
name: Cache poetry deps
env:
cache-name: poetry-deps
with:
path: .venv
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
run: |
pip install poetry
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Run tests
run: |
SH_TESTS_RUNNING=1 SH_TESTS_USE_SELECT=${{ matrix.use-select }} LANG=${{ matrix.lang }} poetry run coverage run -a -m unittest
- name: Store coverage
uses: actions/upload-artifact@v2
with:
name: coverage.${{ matrix.use-select }}.${{ matrix.lang }}.${{ matrix.python-version }}
path: .coverage
- uses: actions/checkout@v2

- uses: actions/cache@v2
name: Cache pip directory
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-3.8

- uses: actions/cache@v2
name: Cache poetry deps
env:
cache-name: poetry-deps
with:
path: .venv
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
run: |
pip install poetry
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Run tests
run: |
SH_TESTS_RUNNING=1 SH_TESTS_USE_SELECT=${{ matrix.use-select }} LANG=${{ matrix.lang }} poetry run coverage run -a -m unittest
- name: Store coverage
uses: actions/upload-artifact@v2
with:
name: coverage.${{ matrix.use-select }}.${{ matrix.lang }}.${{ matrix.python-version }}
path: .coverage

report:
name: Report Coverage
Expand Down Expand Up @@ -127,4 +127,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coverage report
coveralls --service=github
coveralls --service=github
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9.16
300 changes: 152 additions & 148 deletions CHANGELOG.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# runs all tests on all envs, in parallel
.PHONY: test
test: build_test_image
docker run -it --rm -v $(shell pwd):/home/shtest/sh amoffat/shtest tox -p
docker run -it --rm amoffat/shtest tox -p

# one test on all envs, in parallel
.PHONY: test_one
test_one: build_test_image
docker run -it --rm -v $(shell pwd):/home/shtest/sh amoffat/shtest tox -p -- $(test)
docker run -it --rm amoffat/shtest tox -p -- $(test)

.PHONY: build_test_image
build_test_image:
docker build -t amoffat/shtest -f tests/Dockerfile --build-arg cache_bust=949 .
docker build -t amoffat/shtest -f tests/Dockerfile --build-arg cache_bust=950 .

# publishes to PYPI
.PHONY: release
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

|
sh is a full-fledged subprocess replacement for Python 3.6 - 3.8, PyPy and PyPy3
sh is a full-fledged subprocess replacement for Python 3.8 - 3.10, PyPy and PyPy3
that allows you to call *any* program as if it were a function:

.. code:: python
Expand Down
Loading

0 comments on commit 58efe95

Please sign in to comment.