Skip to content

Commit

Permalink
[skip ci] Update Contribution.md (#5352)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Shinji Watanabe <sw005320@gmail.com>
  • Loading branch information
3 people committed Jul 23, 2023
1 parent bb10203 commit 9296a06
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,45 @@ cd egs/mini_an4/your_task
- [.github/workflows](.github/workflows/) configures Github Actions (unittests, integration tests).
- [codecov.yml](codecov.yml) configures CodeCov (code coverage).

### 5.2 Integration testing Locally (Github Actions locally)

You can test if your PR complies with the integrations test before pushing a new update using [act](https://github.com/nektos/act).

### 5.2.1 Installation

To execute **act**:

1. You first need to install [Docker](https://docs.docker.com/engine/install/) on your local PC. Do not forget to login into docker using `docker login`.

2. Install Github CLI. The [instructions](https://github.com/cli/cli#installation) will change depending on your OS. For Linux, you can use the official sources to install the corresponding [package](https://github.com/cli/cli/blob/trunk/docs/install_linux.md#official-sources).

3. Finally, install **act** through [package managers](https://github.com/nektos/act#installation-through-package-managers) or using the [Github CLI](https://github.com/nektos/act#installation-as-github-cli-extension). For Linux, you can use the command: `gh extension install https://github.com/nektos/gh-act`

### 5.2.2 Usage

In a command console:

```bash
cd <root_dir_espnet_clone> # go to the root directory of your clone
gh act
```

The program will start running all the CI tests that will run in the GitHub Action server.

For specific jobs/workflow, you can use:

```bash
# For jobs:
gh act -j <jobID> # Where jobID is a string.

# For workflows:
gh act -W <workflowID>
gh act -W .github/workflows/<filename>.yml
```

List the available jobID/workflowID with: `gh act -l`.
You can get the list of workflow files from `ls .github/workflows`.

## 6 Writing new tools

You can place your new tools under
Expand Down

0 comments on commit 9296a06

Please sign in to comment.