-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from exercism/jie-analyze-all-exercises
Run analyzer on the elm repo in the CI
- Loading branch information
Showing
2 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e # Make script exit when a command fail. | ||
set -u # Exit on usage of undeclared variable. | ||
# set -x # Trace what gets executed. | ||
set -o pipefail # Catch failures in pipes. | ||
|
||
# Command line argument | ||
elm_repo_dir=$(realpath $1) | ||
|
||
# build docker image | ||
docker build --rm -t elm-analyzer . | ||
|
||
# run image passing the arguments | ||
docker run \ | ||
--rm \ | ||
--read-only \ | ||
--network none \ | ||
--mount type=bind,src="$elm_repo_dir",dst=/opt/analyzer/elm_repo \ | ||
--mount type=tmpfs,dst=/tmp \ | ||
--volume "${elm_repo_dir}/bin/analyze_all_exercises.sh:/opt/analyzer/bin/analyze_all_exercises.sh" \ | ||
--entrypoint /opt/analyzer/bin/analyze_all_exercises.sh \ | ||
elm-analyzer \ | ||
/opt/analyzer/elm_repo |