Commit b90535aa authored by Biswa Panda's avatar Biswa Panda Committed by GitHub
Browse files

ci: add instruction for running github actions locally (#218)

parent 73c10ae9
...@@ -54,6 +54,14 @@ jobs: ...@@ -54,6 +54,14 @@ jobs:
with: with:
path: ~/.cargo/bin path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-tools-${{ github.head_ref || github.ref_name }}-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-tools-${{ github.head_ref || github.ref_name }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust in dev environment
# Install Rust only to run GitHub Local Actions in (dev environment) using the `ACT` environment variable.
# See act usage: https://nektosact.com/introduction.html
# https://nektosact.com/usage/index.html?highlight=env.Act#skipping-steps
if: ${{ env.ACT }}
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Set up Rust Toolchain Components - name: Set up Rust Toolchain Components
run: rustup component add rustfmt clippy run: rustup component add rustfmt clippy
- name: Run Cargo Check on runtime - name: Run Cargo Check on runtime
......
...@@ -108,6 +108,19 @@ If a fix is implemented by a pre-commit hook, adding the file again ...@@ -108,6 +108,19 @@ If a fix is implemented by a pre-commit hook, adding the file again
and running `git commit` a second time will pass and successfully and running `git commit` a second time will pass and successfully
commit. commit.
# Running Github actions locally
To run the Github actions locally, you can use the `act` tool.
See [act usage](https://nektosact.com/introduction.html) for more information.
For example, to run the pre-merge-rust workflow locally, you can use the following command from terminal:
```
act -j pre-merge-rust
```
Also you can use vscode extension [GitHub Local Actions](https://marketplace.visualstudio.com/items?itemName=SanjulaGanepola.github-local-actions) to run the workflows from vscode.
# Developer Certificate of Origin # Developer Certificate of Origin
Triton Distributed is an open source product released under Triton Distributed is an open source product released under
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment