-
Notifications
You must be signed in to change notification settings - Fork 418
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use testing repo actions for linting (#3060)
* Use testing repo actions (#2948) * Change to ci repo
- Loading branch information
Showing
5 changed files
with
57 additions
and
108 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 |
---|---|---|
@@ -1,30 +1,42 @@ | ||
name: Code Quality Checks | ||
on: | ||
workflow_call: | ||
inputs: | ||
python_version: | ||
required: true | ||
type: string | ||
pip_deps: | ||
required: true | ||
type: string | ||
push: | ||
branches: | ||
- dev | ||
- main | ||
- release/** | ||
pull_request: | ||
workflow_dispatch: | ||
# Cancel old runs when a new commit is pushed to the same branch if not on main | ||
# or dev | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' }} | ||
defaults: | ||
run: | ||
working-directory: . | ||
jobs: | ||
code-quality: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 15 | ||
strategy: | ||
matrix: | ||
python_version: | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
pip_deps: | ||
- "[dev]" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Get composite run steps repository | ||
uses: actions/checkout@v3 | ||
with: | ||
python-version: ${{ inputs.python_version }} | ||
- name: Setup | ||
run: | | ||
set -ex | ||
python -m pip install --upgrade 'pip<23' wheel | ||
python -m pip install --upgrade .${{ inputs.pip_deps }} | ||
- name: Run checks | ||
run: | | ||
pre-commit run --all-files | ||
repository: mosaicml/ci-testing | ||
ref: v0.0.1 | ||
path: ./ci-testing | ||
- uses: ./ci-testing/.github/actions/code-quality | ||
with: | ||
python_version: ${{ matrix.python_version }} | ||
pip_deps: ${{ matrix.pip_deps }} |
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
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
This file was deleted.
Oops, something went wrong.
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