Skip to content

Commit

Permalink
Test/multiprocessing (#83)
Browse files Browse the repository at this point in the history
* creating action branch to test multiprocessing worker
* preparing for release with multiprocessing 0.0.26
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Mar 27, 2022
1 parent 34deb4c commit 2f87de6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/urlstechie/urlchecker:0.0.25
FROM quay.io/urlstechie/urlchecker:0.0.26
COPY entrypoint.sh /entrypoint.sh
WORKDIR /github/workspace
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2021 Ayoub Malek and Vanessa Sochat
Copyright (c) 2019-2022 Ayoub Malek and Vanessa Sochat

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,11 @@ jobs:
# A comma separated list of file patterns (direct paths work as well) to exclude
exclude_files: README.md,/github/workspace/_config.yml
# numbers of workers to run in parallel (defaults to 9 if unset)
workers: 4
# choose if the force pass or not
force_pass : true
force_pass: true
```
## Inputs

Expand All @@ -140,6 +143,7 @@ jobs:
| `exclude_patterns` | <span style="color:green"> optional </span> | A comma separated list of patterns. |
| `exclude_files` | <span style="color:green"> optional </span> | Full paths to files to exclude (comma separated list). |
| `force_pass` | <span style="color:green"> optional </span> | Choose whether to force a pass when checks are done. |
| `workers` | <span style="color:green"> optional </span> | The number of checks (one per file) to run in parallel, defaults to 9 |

## Demo
- Using version > 0.1.4
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ inputs:
required: false
default: ""

workers:
description: "Number of workers to run in parallel (defaults to 9)"
required: false

runs:
using: "docker"
image: "Dockerfile"
Expand Down
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ if [ "${INPUT_VERBOSE}" == "true" ]; then
COMMAND="${COMMAND} --verbose"
fi

# Do we have a number of workers defined?
if [ ! -z "${INPUT_WORKERS}" ]; then
export URLCHECKER_WORKERS=${INPUT_WORKERS}
fi

# file types are optional
if [ ! -z "${INPUT_FILE_TYPES}" ]; then
COMMAND="${COMMAND} --file-types ${INPUT_FILE_TYPES}"
Expand Down

0 comments on commit 2f87de6

Please sign in to comment.