Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try fixing the DeepSource workflow not triggering #3375

Merged
merged 9 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand All @@ -44,18 +49,16 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
#- name: Autobuild
# uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- run: make depend; go build goa.design/goa/v3/cmd/goa

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
name: Report Test Coverage
on:

on:
workflow_run:
workflows:
- Run Tests and Static Analysis
workflows:
- Run Static Checks and Tests
types: [completed]

jobs:
upload:
report:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'

steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}

- name: Download test coverage
uses: actions/download-artifact@v3
with:
name: coverage
path: cover.out

- name: Report analysis to DeepSource
run: |
curl https://deepsource.io/cli | sh
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/build.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Run Tests and Static Analysis
name: Run Static Checks and Tests

on:
push:
branches:
Expand All @@ -15,16 +16,20 @@ jobs:
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: Check out code
uses: actions/checkout@v4

- 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
Expand Down