-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: See title. If all is well, we can deprecate the CCI job in a few days. Pull Request resolved: #3341 Reviewed By: mthrok Differential Revision: D46324265 Pulled By: osalpekar fbshipit-source-id: bc706c6ae4285d4085dc5f0223ea41d8fc290f1c
- Loading branch information
1 parent
2283df8
commit 5d0697b
Showing
2 changed files
with
40 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Lint | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- nightly | ||
- main | ||
- release/* | ||
workflow_dispatch: | ||
|
||
jobs: | ||
python-source-and-configs: | ||
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main | ||
with: | ||
repository: pytorch/audio | ||
script: | | ||
set -euo pipefail | ||
echo '::group::Setup environment' | ||
CONDA_PATH=$(which conda) | ||
eval "$(${CONDA_PATH} shell.bash hook)" | ||
conda create --name ci --quiet --yes python=3.8 pip | ||
conda activate ci | ||
echo '::endgroup::' | ||
echo '::group::Install lint tools' | ||
pip install --upgrade pip | ||
pip install --progress-bar=off pre-commit | ||
set +e | ||
pre-commit run --all-files | ||
if [ $? -ne 0 ]; then | ||
git --no-pager diff | ||
exit 1 | ||
fi | ||
echo '::endgroup::' |
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