Skip to content

Commit

Permalink
Refactor Docker execution in workflow and Makefile
Browse files Browse the repository at this point in the history
Refactored Docker command in main.yml to use make demo-docker with continue-on-error option and updated the Makefile to include demo-docker target for running demos via Docker.
  • Loading branch information
Denis Smet committed Mar 11, 2024
1 parent 20e8394 commit d91174f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,5 @@ jobs:
run: docker run --rm jbzoo/csv-blueprint --ansi

- name: Reporting example via Docker
run: make demo-invalid-docker
run: make demo-docker --no-print-directory
continue-on-error: true
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,23 @@ demo-valid: ##@Project Run demo valid CSV
--csv=./tests/fixtures/demo.csv \
--schema=./tests/schemas/demo_valid.yml

demo-invalid-docker: ##@Project Run demo valid CSV (via Docker)
demo-docker: ##@Project Run demo via Docker
$(call title,"Demo - Valid CSV \(via Docker\)")
@docker run --rm \
-v `pwd`:/parent-host \
jbzoo/csv-blueprint \
validate:csv \
--csv=/parent-host/tests/fixtures/demo.csv \
--schema=/parent-host/tests/schemas/demo_invalid.yml
--schema=/parent-host/tests/schemas/demo_valid.yml \
--ansi
$(call title,"Demo - Invalid CSV \(via Docker\)")
@docker run --rm \
-v `pwd`:/parent-host \
jbzoo/csv-blueprint \
validate:csv \
--csv=/parent-host/tests/fixtures/demo.csv \
--schema=/parent-host/tests/schemas/demo_invalid.yml \
--ansi


demo-invalid: ##@Project Run demo invalid CSV
Expand Down

0 comments on commit d91174f

Please sign in to comment.