-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: use paths to restrict workflow runs
- Loading branch information
1 parent
8986b96
commit 7d085e2
Showing
7 changed files
with
31 additions
and
6 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 |
---|---|---|
|
@@ -23,7 +23,15 @@ on: | |
push: | ||
branches: | ||
- main | ||
paths: | ||
- "*.go" | ||
- "go.mod" | ||
- "go.sum" | ||
pull_request: | ||
paths: | ||
- "*.go" | ||
- "go.mod" | ||
- "go.sum" | ||
jobs: | ||
ci: | ||
strategy: | ||
|
@@ -36,12 +44,15 @@ jobs: | |
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
if: matrix.os == 'windows-latest' | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Cache Go | ||
uses: actions/cache@v3 | ||
with: | ||
|
@@ -51,24 +62,29 @@ jobs: | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Install Task | ||
uses: arduino/setup-task@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Test | ||
run: task test | ||
|
||
- name: Build | ||
run: task build | ||
|
||
# All static checks from this point should run on linux as it is the | ||
# fastest platform | ||
- name: Integration Test | ||
if: matrix.os == 'ubuntu-latest' | ||
run: task integration-test | ||
|
||
- name: Lint Code | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: golangci/[email protected] | ||
with: | ||
skip-go-installation: true | ||
|
||
- name: misspell | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: reviewdog/action-misspell@v1 | ||
|
@@ -82,6 +98,7 @@ jobs: | |
./Taskfile.yaml | ||
./.github/workflows/** | ||
./CODE_OF_CONDUCT.md | ||
- name: Code Coverage | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: codecov/codecov-action@v3 | ||
|
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 |
---|---|---|
|
@@ -31,6 +31,7 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_UPLIFT }} | ||
|
||
- name: Release | ||
uses: gembaadvantage/[email protected] | ||
with: | ||
|