-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrade CI/CD to match Goa * Use default setup for CodeQL
- Loading branch information
Showing
6 changed files
with
110 additions
and
65 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,10 @@ | ||
version = 1 | ||
[[analyzers]] | ||
name = "test-coverage" | ||
enabled = true | ||
[[analyzers]] | ||
name = "go" | ||
[analyzers.meta] | ||
import_root = "goa.design/model" | ||
[[analyzers]] | ||
name = "secrets" |
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,20 @@ | ||
# Dependency Review Action | ||
# | ||
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. | ||
# | ||
# Source repository: https://github.com/actions/dependency-review-action | ||
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement | ||
name: 'Dependency Review' | ||
on: [pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dependency-review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout Repository' | ||
uses: actions/checkout@v4 | ||
- name: 'Dependency Review' | ||
uses: actions/dependency-review-action@v3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Report Test Coverage | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- Run Static Checks and Tests | ||
types: [completed] | ||
|
||
jobs: | ||
report: | ||
runs-on: ubuntu-latest | ||
if: github.event.workflow_run.conclusion == 'success' | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ github.event.workflow_run.head_repository.full_name }} | ||
ref: ${{ github.event.workflow_run.head_branch }} | ||
|
||
- name: Download test coverage | ||
uses: dawidd6/action-download-artifact@v2 | ||
with: | ||
workflow: test.yml | ||
name: coverage | ||
|
||
- name: Report analysis to DeepSource | ||
run: | | ||
curl https://deepsource.io/cli | sh | ||
./bin/deepsource report --analyzer test-coverage --key go --value-file ./cover.out | ||
env: | ||
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} |
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,38 @@ | ||
name: Run Static Checks and Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ci: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
go: ['1.20', '1.21'] | ||
os: ['ubuntu-latest', 'windows-latest'] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go ${{ matrix.go }} | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
id: go | ||
|
||
- name: Build | ||
run: make ci | ||
|
||
- name: Upload test coverage for deep source | ||
if: matrix.go == '1.21' && matrix.os == 'ubuntu-latest' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage | ||
path: cover.out |
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