mirror of
https://github.com/jongracecox/anybadge.git
synced 2026-01-04 19:32:11 +01:00
test: Run cli checks in PR workflow
Simplify execution of CLI tests and run them in the CI workflow after Python tests.
This commit is contained in:
3
.github/workflows/python_checks.yaml
vendored
3
.github/workflows/python_checks.yaml
vendored
@@ -32,3 +32,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: pytest --doctest-modules --cov=anybadge --cov-report term --cov-report xml:coverage.xml --cov-report html:htmlcov anybadge tests
|
run: pytest --doctest-modules --cov=anybadge --cov-report term --cov-report xml:coverage.xml --cov-report html:htmlcov anybadge tests
|
||||||
|
|
||||||
|
- name: CLI tests
|
||||||
|
run: docker/test/shell_tests.sh
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
PROJECT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd )"
|
||||||
|
|
||||||
|
echo "Running shell tests..."
|
||||||
|
echo "Source directory: ${SOURCE_DIR}"
|
||||||
|
echo "Project directory: ${PROJECT_DIR}"
|
||||||
|
|
||||||
source "${SOURCE_DIR:-.}/helpers.sh" || { echo "Failed to load helpers." ; exit 1 ; }
|
source "${SOURCE_DIR:-.}/helpers.sh" || { echo "Failed to load helpers." ; exit 1 ; }
|
||||||
|
|
||||||
echo -n "Getting installed version... "
|
echo -n "Getting installed version... "
|
||||||
|
|||||||
@@ -74,6 +74,6 @@ def cli(c, version="latest"):
|
|||||||
shell_test = PROJECT_DIR / Path("docker/test/shell_tests.sh")
|
shell_test = PROJECT_DIR / Path("docker/test/shell_tests.sh")
|
||||||
|
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
f'SOURCE_DIR="{shell_test.parent}" PROJECT_DIR="{PROJECT_DIR}" {shell_test}',
|
str(shell_test),
|
||||||
shell=True,
|
shell=True,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user