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

chore: reduce concurrent builds #702

Merged
merged 2 commits into from
Dec 19, 2022
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
4 changes: 4 additions & 0 deletions .github/workflows/bigtable-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Bigtable example pipeline

on: [push, pull_request]

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true

jobs:
test-bigtable:
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Main pipeline

on: [push, pull_request]

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true

jobs:
test:
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cockroachdb-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Cockroachdb example pipeline

on: [push, pull_request]

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true

jobs:
test-cockroachdb:
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/datastore-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Datastore example pipeline

on: [push, pull_request]

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true

jobs:
test-datastore:
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/firestore-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Firestore example pipeline

on: [push, pull_request]

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true

jobs:
test-firestore:
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- main
pull_request:

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/mysql-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Mysql example pipeline

on: [push, pull_request]

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true

jobs:
test-mysql:
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/nginx-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Nginx example pipeline

on: [push, pull_request]

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true

jobs:
test-nginx:
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/postgres-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Postgres example pipeline

on: [push, pull_request]

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true

jobs:
test-postgres:
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pubsub-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Pubsub example pipeline

on: [push, pull_request]

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true

jobs:
test-pubsub:
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pulsar-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Pulsar example pipeline

on: [push, pull_request]

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true

jobs:
test-pulsar:
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/redis-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Redis example pipeline

on: [push, pull_request]

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true

jobs:
test-redis:
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/spanner-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Spanner example pipeline

on: [push, pull_request]

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true

jobs:
test-spanner:
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/toxiproxy-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Toxiproxy example pipeline

on: [push, pull_request]

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true

jobs:
test-toxiproxy:
strategy:
Expand Down
4 changes: 4 additions & 0 deletions examples/_template/ci.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

on: [push, pull_request]

concurrency:
group: {{ "${{ github.workflow }}-${{ github.head_ref || github.sha }}" }}
cancel-in-progress: true

jobs:
test-{{ $lower }}:
strategy:
Expand Down
8 changes: 4 additions & 4 deletions examples/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,12 @@ func assertExampleGithubWorkflowContent(t *testing.T, example Example, exampleWo

data := strings.Split(string(content), "\n")
assert.Equal(t, "name: "+title+" example pipeline", data[0])
assert.Equal(t, " test-"+lower+":", data[5])
assert.Equal(t, " go-version: ${{ matrix.go-version }}", data[15])
assert.Equal(t, " working-directory: ./examples/"+lower, data[22])
assert.Equal(t, " test-"+lower+":", data[9])
assert.Equal(t, " go-version: ${{ matrix.go-version }}", data[19])
assert.Equal(t, " working-directory: ./examples/"+lower, data[26])
assert.Equal(t, " working-directory: ./examples/"+lower, data[30])
assert.Equal(t, " paths: \"**/TEST-"+lower+"*.xml\"", data[40])
assert.Equal(t, " working-directory: ./examples/"+lower, data[34])
assert.Equal(t, " paths: \"**/TEST-"+lower+"*.xml\"", data[44])
}

// assert content go.mod
Expand Down