mirror of
https://github.com/jongracecox/anybadge.git
synced 2025-07-21 04:11:05 +02: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:
committed by
Jon Grace-Cox
parent
bb9ef961fb
commit
96d102f307
3
.github/workflows/python_checks.yaml
vendored
3
.github/workflows/python_checks.yaml
vendored
@@ -32,3 +32,6 @@ jobs:
|
||||
|
||||
- name: Run 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
|
||||
|
||||
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 ; }
|
||||
|
||||
echo -n "Getting installed version... "
|
||||
|
@@ -74,6 +74,6 @@ def cli(c, version="latest"):
|
||||
shell_test = PROJECT_DIR / Path("docker/test/shell_tests.sh")
|
||||
|
||||
subprocess.run(
|
||||
f'SOURCE_DIR="{shell_test.parent}" PROJECT_DIR="{PROJECT_DIR}" {shell_test}',
|
||||
str(shell_test),
|
||||
shell=True,
|
||||
)
|
||||
|
Reference in New Issue
Block a user