Skip to content

Commit

Permalink
ci: uci/copy-templates (#8)
Browse files Browse the repository at this point in the history
* chore: add or force update .github/workflows/go-test.yml

* chore: add or force update .github/workflows/go-check.yml

* chore: add or force update .github/workflows/releaser.yml

* chore: add or force update .github/workflows/release-check.yml

* chore: add or force update .github/workflows/tagpush.yml

* chore: add or force update version.json

* chore: format according to staticcheck rules

* chore: format according to staticcheck rules

* fix: use process collector opts from collectors
  • Loading branch information
web3-bot authored Aug 14, 2023
1 parent ff734ed commit 6b46e6b
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/go-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Go Checks

on:
pull_request:
push:
branches: ["main"]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
go-check:
uses: pl-strflt/uci/.github/workflows/[email protected]
18 changes: 18 additions & 0 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Go Test

on:
pull_request:
push:
branches: ["main"]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
go-test:
uses: pl-strflt/uci/.github/workflows/[email protected]
19 changes: 19 additions & 0 deletions .github/workflows/release-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release Checker

on:
pull_request_target:
paths: [ 'version.json' ]
types: [ opened, synchronize, reopened, labeled, unlabeled ]
workflow_dispatch:

permissions:
contents: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
release-check:
uses: pl-strflt/uci/.github/workflows/[email protected]
17 changes: 17 additions & 0 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Releaser

on:
push:
paths: [ 'version.json' ]
workflow_dispatch:

permissions:
contents: write

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

jobs:
releaser:
uses: pl-strflt/uci/.github/workflows/[email protected]
18 changes: 18 additions & 0 deletions .github/workflows/tagpush.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Tag Push Checker

on:
push:
tags:
- v*

permissions:
contents: read
issues: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
releaser:
uses: pl-strflt/uci/.github/workflows/[email protected]
3 changes: 2 additions & 1 deletion metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"contrib.go.opencensus.io/exporter/prometheus"
prom "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/collectors"
"go.opencensus.io/stats"
"go.opencensus.io/stats/view"
"go.opencensus.io/tag"
Expand Down Expand Up @@ -92,7 +93,7 @@ func NewDimensionlessCounter(name string, desc string, tagKeys ...tag.Key) (*Cou

func RegisterPrometheusExporter(namespace string) (*prometheus.Exporter, error) {
registry := prom.NewRegistry()
registry.MustRegister(prom.NewGoCollector(), prom.NewProcessCollector(prom.ProcessCollectorOpts{}))
registry.MustRegister(collectors.NewGoCollector(), collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}))

pe, err := prometheus.NewExporter(prometheus.Options{
Namespace: namespace,
Expand Down
1 change: 0 additions & 1 deletion storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ func (b *Batcher) Add(ctx context.Context, e *TraceEvent) {
return
}
}
return
}

func (b *Batcher) flush(ctx context.Context) error {
Expand Down
3 changes: 3 additions & 0 deletions version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "v0.0.3"
}

0 comments on commit 6b46e6b

Please sign in to comment.