-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4be94e0
commit aa410e1
Showing
1 changed file
with
95 additions
and
22 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,61 +2,134 @@ | |
|
||
## Overview | ||
|
||
This GitHub Action allows you to run a ROOT CERN script for high-energy physics analysis. The action sets up the ROOT environment, runs the specified ROOT script, and verifies the existence of an output file. | ||
This GitHub Action allows you to run a ROOT CERN script for different purposes. The action sets up the ROOT environment, runs the specified ROOT script, and verifies the existence of an output file. | ||
|
||
## Inputs | ||
## Action Inputs | ||
|
||
### `root_script` | ||
|
||
**Required**: The name of the ROOT CERN script you want to run. Provide the script name as a string, for example, `'script_name.C'`. | ||
|
||
### `output_file` | ||
|
||
**Required**: The name of the output file to check for after the ROOT script has been executed. Provide the filename as a string, for example, `'output.png'`. | ||
**Optional**: The name of the output file to check for after the ROOT script has been executed. Provide the filename as a string, for example, `'output.png'`. If no output file is expected, this parameter can be omitted. | ||
|
||
## Usage | ||
|
||
Add a step in your GitHub Actions workflow YAML file to use this action: | ||
|
||
```yaml | ||
- name: Run ROOT CERN Script Action | ||
uses: MohamedElashri/rootcern-action@1.1 | ||
uses: MohamedElashri/rootcern-action@1.0 | ||
with: | ||
root_script: 'test_root_script.C' | ||
output_file: 'test_root_output.png' | ||
scripts: 'test_root_script.C' | ||
output_files: 'test_root_output.png' | ||
``` | ||
## Example Workflow | ||
## Examples | ||
Here is a full example of a workflow | ||
### Example 1: Running a single script with no output file | ||
```yaml | ||
name: test root | ||
name: ROOT CI, Single without output | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
example: | ||
runs-on: ubuntu-latest | ||
test: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run ROOT CERN Script | ||
uses: MohamedElashri/[email protected] | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Run ROOT CERN scripts | ||
uses: your-github-username/your-action-repo@main | ||
with: | ||
root_script: 'test_root_script.C' | ||
output_file: 'test_root_output.png' | ||
scripts: test_root_script1.C | ||
``` | ||
### `output_file` | ||
### Example 2: Running a single script with an output file | ||
**Optional**: The name of the output file to check for after the ROOT script has been executed. Provide the filename as a string, for example, `'output.png'`. If no output file is expected, this parameter can be omitted. | ||
```yaml | ||
name: ROOT CI, Single with output | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Run ROOT CERN scripts | ||
uses: MohamedElashri/[email protected] | ||
with: | ||
scripts: test_root_script1.C | ||
output_files: test_root_output1.png | ||
``` | ||
### Example 3: Running multiple scripts with output files | ||
```yaml | ||
name: ROOT CI, multiple scripts with output files | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Run ROOT CERN scripts | ||
uses: MohamedElashri/[email protected] | ||
with: | ||
scripts: test_root_script1.C,test_root_script2.C | ||
output_files: test_root_output1.png,test_root_output2.png | ||
``` | ||
## License | ||
This project is licensed under the GNU General Public License, version 3.0 (GPL-3.0). You can find the full text of the license [here](https://github.com/MohamedElashri/rootcern-action/blob/main/LICENSE) | ||
## Contributions | ||
I welcome contributions to this project! If you have any ideas for improvements, bug fixes, or new features, please feel free to submit a pull request. | ||
Here are some tips for contributing to this project: | ||
Here are some ways you can contribute to this project: | ||
* Submit bug reports and feature requests. | ||
* Write code, tests, and documentation. | ||
* Review and improve existing code. | ||
* Help promote the project to others. | ||
In general you should follow these guidlines. | ||
* Make sure your contributions are well-tested and documented. | ||
* Follow the project's coding style guide. | ||
* Add a comment to your pull request explaining what your changes do. | ||
* Be respectful and considerate of other contributors. | ||
I appreciate your contributions to this project! | ||