Skip to content

Commit

Permalink
fix: ensure unique job names across all GHA workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh committed Mar 21, 2023
1 parent d45d8ec commit fb80af5
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
GO_VERSION: 1.19.1

jobs:
prepare:
interop-prep:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 5
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
name: kubo
path: cmd/ipfs/ipfs
interop:
needs: [prepare]
needs: [interop-prep]
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
IPFS_GO_EXEC: ${{ github.workspace }}/cmd/ipfs/ipfs
working-directory: interop
go-ipfs-api:
needs: [prepare]
needs: [interop-prep]
runs-on: ubuntu-latest
timeout-minutes: 5
env:
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
- run: cmd/ipfs/ipfs shutdown
if: always()
go-ipfs-http-client:
needs: [prepare]
needs: [interop-prep]
runs-on: ubuntu-latest
timeout-minutes: 5
env:
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
- run: go test -count=1 -v ./...
working-directory: go-ipfs-http-client
ipfs-webui:
needs: [prepare]
needs: [interop-prep]
runs-on: ubuntu-latest
timeout-minutes: 20
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:
security-events: write # (github/codeql-action/autobuild)

jobs:
go:
codeql:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 20
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'master'

jobs:
head:
docker-build:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/gobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
- 'master'

jobs:
runner:
go-build-runner:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
uses: ipfs/kubo/.github/workflows/runner.yml@master
build:
needs: [runner]
runs-on: ${{ fromJSON(needs.runner.outputs.config).labels }}
go-build:
needs: [go-build-runner]
runs-on: ${{ fromJSON(needs.go-build-runner.outputs.config).labels }}
timeout-minutes: 20
env:
TEST_NO_DOCKER: 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golang-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
contents: read # to fetch code (actions/checkout)

jobs:
check:
go-check:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'master'

jobs:
lint:
go-lint:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gotest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'master'

jobs:
test:
go-test:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 20
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/sharness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
- 'master'

jobs:
runner:
sharness-runner:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
uses: ipfs/kubo/.github/workflows/runner.yml@master
test:
needs: [runner]
runs-on: ${{ fromJSON(needs.runner.outputs.config).labels }}
sharness-test:
needs: [sharness-runner]
runs-on: ${{ fromJSON(needs.sharness-runner.outputs.config).labels }}
timeout-minutes: 20
defaults:
run:
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
TEST_EXPENSIVE: 1
IPFS_CHECK_RCMGR_DEFAULTS: 1
CONTINUE_ON_S_FAILURE: 1
PARALLEL: ${{ fromJSON(needs.runner.outputs.config).parallel }}
PARALLEL: ${{ fromJSON(needs.sharness-runner.outputs.config).parallel }}
- name: Upload coverage report
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
if: failure() || success()
Expand Down Expand Up @@ -96,12 +96,12 @@ jobs:
- name: Upload one-page HTML report to S3
id: one-page
uses: pl-strflt/tf-aws-gh-runner/.github/actions/upload-artifact@main
if: fromJSON(needs.runner.outputs.config).aws && (failure() || success())
if: fromJSON(needs.sharness-runner.outputs.config).aws && (failure() || success())
with:
source: kubo/test/sharness/test-results/sharness.html
destination: sharness.html
- name: Upload one-page HTML report
if: (! fromJSON(needs.runner.outputs.config).aws) && (failure() || success())
if: (! fromJSON(needs.sharness-runner.outputs.config).aws) && (failure() || success())
uses: actions/upload-artifact@v3
with:
name: sharness.html
Expand All @@ -116,18 +116,18 @@ jobs:
- name: Upload full HTML report to S3
id: full
uses: pl-strflt/tf-aws-gh-runner/.github/actions/upload-artifact@main
if: fromJSON(needs.runner.outputs.config).aws && (failure() || success())
if: fromJSON(needs.sharness-runner.outputs.config).aws && (failure() || success())
with:
source: kubo/test/sharness/test-results/sharness-html
destination: sharness-html/
- name: Upload full HTML report
if: (! fromJSON(needs.runner.outputs.config).aws) && (failure() || success())
if: (! fromJSON(needs.sharness-runner.outputs.config).aws) && (failure() || success())
uses: actions/upload-artifact@v3
with:
name: sharness-html
path: kubo/test/sharness/test-results/sharness-html
- name: Add S3 links to the summary
if: fromJSON(needs.runner.outputs.config).aws && (failure() || success())
if: fromJSON(needs.sharness-runner.outputs.config).aws && (failure() || success())
run: echo "$MD" >> $GITHUB_STEP_SUMMARY
env:
MD: |
Expand Down

0 comments on commit fb80af5

Please sign in to comment.