diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-13 19:43:18 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-13 19:45:44 +0200 |
commit | 8684161f8d65f247a5cbb2608692391c5d3ae789 (patch) | |
tree | 22b15f2498fd0f46a7a338f7af8be97067abff7b | |
parent | Makefile: remove unused recipes (diff) | |
download | cgitize-8684161f8d65f247a5cbb2608692391c5d3ae789.tar.gz cgitize-8684161f8d65f247a5cbb2608692391c5d3ae789.zip |
Makefile: add test target
-rw-r--r-- | .github/workflows/ci.yml | 6 | ||||
-rw-r--r-- | DEVELOPMENT.md | 5 | ||||
-rw-r--r-- | Makefile | 15 |
3 files changed, 21 insertions, 5 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a791e75..9d58c15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,10 +31,8 @@ jobs: run: pip install -q -e . - name: Verify that scripts are runnable run: cgitize --version - - name: Unit tests - run: make test/unit - - name: Integration test (local) - run: make test/local + - name: Run tests + run: make test test_docker: runs-on: ubuntu-latest diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 7006dc4..487c318 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -4,7 +4,7 @@ Workspace setup * Create a virtual Python environment: `make venv` * Use the virtual environment: `. .venv/bin/activate` * Deactivate the environment when you're done: `deactivate` -* Make sure unit tests work: `make test/unit` +* Make sure basic tests work: `make test` Development ----------- @@ -21,6 +21,9 @@ Run them using limits. Set environment variables described in [examples/cgitize.toml] to use "access tokens" and get much higher rate limits. + * Run both unit tests and the `local` test using + + make test [examples/cgitize.toml]: examples/cgitize.toml @@ -30,20 +30,35 @@ python: .PHONY: repl repl: python +.PHONY: test +test: test/unit test/local + .PHONY: test/unit test/unit: + @echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + @echo Unit tests + @echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ python -m unittest --verbose --buffer .PHONY: test/local test/local: + @echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + @echo Integration test: local + @echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./test/integration/local/test.sh .PHONY: test/docker test/docker: + @echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + @echo Integration test: docker + @echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./test/integration/docker/test.sh .PHONY: test/example test/example: + @echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + @echo Integration test: example + @echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./test/integration/example/test.sh .PHONY: tag |