-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Change to pull_request_target (#3025)"
This reverts commit 7d6afe1.
- Loading branch information
1 parent
59a83d4
commit c2e3013
Showing
7 changed files
with
111 additions
and
99 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,49 +1,30 @@ | ||
name: Code Quality Checks | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
- main | ||
- release/** | ||
pull_request_target: | ||
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' }} | ||
workflow_call: | ||
inputs: | ||
python_version: | ||
required: true | ||
type: string | ||
pip_deps: | ||
required: true | ||
type: string | ||
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: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Get Repo Token | ||
id: REPO_TOKEN | ||
uses: tibdex/github-app-token@v1 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
app_id: ${{ secrets.DEVOGE_BOT_PUB_APPID }} | ||
private_key: ${{ secrets.DEVOGE_BOT_PUB_PEM }} | ||
- name: Get composite run steps repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: mosaicml/testing | ||
ref: v0.0.2 | ||
path: ./testing | ||
token: ${{ steps.REPO_TOKEN.outputs.token }} | ||
- uses: ./testing/.github/actions/code-quality | ||
with: | ||
python_version: ${{ matrix.python_version }} | ||
pip_deps: ${{ matrix.pip_deps }} | ||
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 |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: PR Code Quality Checks | ||
on: | ||
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' }} | ||
jobs: | ||
code-quality: | ||
uses: ./.github/workflows/code-quality.yaml | ||
strategy: | ||
matrix: | ||
python_version: | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
pip_deps: | ||
- "[dev]" | ||
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