generated from deepgram/oss-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #394 from dvonthenen/github-action-automation
GitHub Automation Minus Python Static Checking
- Loading branch information
Showing
27 changed files
with
876 additions
and
78 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
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
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,31 @@ | ||
name: Check - actionlint | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- assigned | ||
- opened | ||
- synchronize | ||
- reopened | ||
paths: | ||
- ".github/workflows/**" | ||
|
||
jobs: | ||
checkactionlint: | ||
name: Check actionlint | ||
# Only run this job if we're in the main repo, not a fork. | ||
if: github.repository == 'deepgram/deepgram-python-sdk' | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout code by commit | ||
uses: actions/checkout@v4 | ||
|
||
- name: Ensure dependencies installed | ||
shell: bash | ||
run: | | ||
make ensure-deps | ||
- name: Run actionlint | ||
run: | | ||
make actionlint |
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,35 @@ | ||
name: Check - All linters, etc | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- release-* | ||
tags-ignore: | ||
- "**" | ||
|
||
jobs: | ||
build: | ||
name: Change to Main/Release Branch | ||
# Only run this job if we're in the main repo, not a fork. | ||
if: github.repository == 'deepgram/deepgram-python-sdk' | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout code by commit | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "1.19" | ||
id: go | ||
|
||
- name: Ensure dependencies installed | ||
shell: bash | ||
run: | | ||
make ensure-deps | ||
- name: Run all checks | ||
shell: bash | ||
run: | | ||
make check |
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,53 @@ | ||
name: Check - lint | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- assigned | ||
- opened | ||
- synchronize | ||
- reopened | ||
paths: | ||
- "**.go" | ||
- "**/go.mod" | ||
- ".golangci.yaml" | ||
|
||
jobs: | ||
checklint: | ||
name: Lint | ||
# Only run this job if we're in the main repo, not a fork. | ||
if: github.repository == 'deepgram/deepgram-go-sdk' | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout code by commit | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "1.19" | ||
id: go | ||
|
||
# - name: Get Date | ||
# id: get-date | ||
# shell: bash | ||
# run: | | ||
# echo "date=$(date -u "+%Y-%m")" >> $GITHUB_OUTPUT | ||
|
||
- name: Restore Lint Cache | ||
uses: actions/cache@v3 | ||
timeout-minutes: 10 | ||
continue-on-error: true | ||
with: | ||
path: ${{ runner.temp }}/lint_cache | ||
# key: ${{ runner.os }}-lint-cache-${{ steps.get-date.outputs.date }} | ||
key: ${{ runner.os }}-lint-cache | ||
restore-keys: | | ||
${{ runner.os }}-lint-cache | ||
|
||
- name: Run golangci-lint | ||
env: | ||
GOLANGCI_LINT_CACHE: ${{ runner.temp }}/lint_cache | ||
run: | | ||
make lint |
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,32 @@ | ||
name: Check - mdlint | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- assigned | ||
- opened | ||
- synchronize | ||
- reopened | ||
paths: | ||
- "**.md" | ||
- "hack/check/check-mdlint.sh" | ||
|
||
jobs: | ||
checkmdlint: | ||
name: Check mdlint | ||
# Only run this job if we're in the main repo, not a fork. | ||
if: github.repository == 'deepgram/deepgram-python-sdk' | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout code by commit | ||
uses: actions/checkout@v4 | ||
|
||
- name: Ensure dependencies installed | ||
shell: bash | ||
run: | | ||
make ensure-deps | ||
- name: Run mdlint | ||
run: | | ||
make mdlint |
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,33 @@ | ||
name: Check - shell | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- assigned | ||
- opened | ||
- synchronize | ||
- reopened | ||
paths: | ||
- "**/Makefile" | ||
- "**.sh" | ||
- "hack/check/check-shell.sh" | ||
|
||
jobs: | ||
checkshell: | ||
name: Check shell | ||
# Only run this job if we're in the main repo, not a fork. | ||
if: github.repository == 'deepgram/deepgram-python-sdk' | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout code by commit | ||
uses: actions/checkout@v4 | ||
|
||
- name: Ensure dependencies installed | ||
shell: bash | ||
run: | | ||
make ensure-deps | ||
- name: Run shellcheck | ||
run: | | ||
make shellcheck |
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,31 @@ | ||
name: Check - yaml | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- assigned | ||
- opened | ||
- synchronize | ||
- reopened | ||
paths: | ||
- ".github/workflows/**" | ||
|
||
jobs: | ||
checkmdlint: | ||
name: Check mdlint | ||
# Only run this job if we're in the main repo, not a fork. | ||
if: github.repository == 'deepgram/deepgram-python-sdk' | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout code by commit | ||
uses: actions/checkout@v4 | ||
|
||
- name: Ensure dependencies installed | ||
shell: bash | ||
run: | | ||
make ensure-deps | ||
- name: Run mdlint | ||
run: | | ||
make mdlint |
Oops, something went wrong.