Skip to content

Commit a2bc6f1

Browse files
committed
Added some basic tests, more work to be done and preparing a bug fix release
1 parent 7d3537e commit a2bc6f1

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log for spellcheck-github-actions
22

3+
## 0.43.1, 2024-10-17, bug fix release, update recommended
4+
5+
- This is an attempt at addressing the conflict between using the PySpelling `--source` parameter and the `sources` parameter in the PySpelling configuration file introduced by this action. With the recommendation of using the GitHub Action: [tj-actions/changed-files](https://github.com/marketplace/actions/changed-files), the use of the `--source` flag was adopted, but this bypasses the filtering mechanism, which can be enabled in the configuration file. The update recommendation is due to the fact that you might experience unwanted behaviour if your `sources` contain negated file patterns. The patch enables application of the configured filter to the source parameters, so the action can be used with the `--source` parameter and the `sources` configuration parameter in combination.
6+
7+
- Issue [#213](https://github.com/rojopolis/spellcheck-github-actions/issues/213)
8+
39
## 0.43.0, 2024-10-08, maintenance release, update not required
410

511
- Docker image updated to Python 3.12.7 slim via PR [#215](https://github.com/rojopolis/spellcheck-github-actions/pull/215) from Dependabot. [Release notes for Python 3.12.7](https://docs.python.org/release/3.12.7/whatsnew/changelog.html)

test/test.bats

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
@test "can do basic run using Docker image with two input files" {
2+
docker run -e INPUT_SOURCE_FILES="README.md CHANGELOG.md" \
3+
-e INPUT_TASK_NAME=Markdown -it -v $PWD:/tmp \
4+
jonasbn/github-action-spellcheck:local
5+
}
6+
7+
@test "can do basic run using Docker image with unignored and ignored input files" {
8+
docker run -e INPUT_SOURCE_FILES="README.md venv/lib/python3.13/site-packages/pyspelling-2.10.dist-info/licenses/LICENSE.md" \
9+
-e INPUT_TASK_NAME=Markdown -it -v $PWD:/tmp \
10+
jonasbn/github-action-spellcheck:local
11+
}
12+
13+
@test "can do basic run using Docker image with just ignored input file" {
14+
docker run -e INPUT_SOURCE_FILES="venv/lib/python3.13/site-packages/pyspelling-2.10.dist-info/licenses/LICENSE.md" \
15+
-e INPUT_TASK_NAME=Markdown -it -v $PWD:/tmp \
16+
jonasbn/github-action-spellcheck:local
17+
}
18+
19+
@test "can do basic run using Docker image without any input files" {
20+
docker run \
21+
-e INPUT_TASK_NAME=Markdown -it -v $PWD:/tmp \
22+
jonasbn/github-action-spellcheck:local
23+
}
24+
25+
@test "can do basic run using Docker image without task parameter" {
26+
docker run \
27+
-it -v $PWD:/tmp \
28+
jonasbn/github-action-spellcheck:local
29+
}
30+
31+
@test "can do basic run using Docker image with two input files but not task parameter" {
32+
! docker run -e INPUT_SOURCE_FILES="README.md CHANGELOG.md" \
33+
-it -v $PWD:/tmp \
34+
jonasbn/github-action-spellcheck:local
35+
}
36+
37+
@test "can do basic run using Docker image with two non-existing input files" {
38+
! docker run -e INPUT_SOURCE_FILES="DONOTREADME.md LOGCHANGE.md" \
39+
-e INPUT_TASK_NAME=Markdown -it -v $PWD:/tmp \
40+
jonasbn/github-action-spellcheck:local
41+
}

0 commit comments

Comments
 (0)