Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

ci: uci/copy-templates #190

Merged
merged 11 commits into from
Aug 23, 2023
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: ["master"]
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/go-check.yml@v0.0
5 changes: 5 additions & 0 deletions .github/workflows/go-test-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"skip32bit": true,
"skipOSes": ["macos", "windows"],
"skipRace": true
}
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: ["master"]
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/go-test.yml@v0.0
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/release-check.yml@v0.0
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/releaser.yml@v0.0
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/tagpush.yml@v0.0
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ require (
github.com/libp2p/go-libp2p v0.24.1
github.com/libp2p/go-libp2p-kad-dht v0.20.0
github.com/libp2p/go-libp2p-kbucket v0.5.0
github.com/libp2p/go-libp2p-peerstore v0.8.0
github.com/libp2p/go-libp2p-record v0.2.0
github.com/multiformats/go-multiaddr v0.8.0
github.com/multiformats/go-multicodec v0.7.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,6 @@ github.com/libp2p/go-libp2p-kad-dht v0.20.0 h1:1bcMa74JFwExCHZMFEmjtHzxX5DovhJ07
github.com/libp2p/go-libp2p-kad-dht v0.20.0/go.mod h1:qPIXdiZsLczhV4/+4EO1jE8ae0YCW4ZOogc4WVIyTEU=
github.com/libp2p/go-libp2p-kbucket v0.5.0 h1:g/7tVm8ACHDxH29BGrpsQlnNeu+6OF1A9bno/4/U1oA=
github.com/libp2p/go-libp2p-kbucket v0.5.0/go.mod h1:zGzGCpQd78b5BNTDGHNDLaTt9aDK/A02xeZp9QeFC4U=
github.com/libp2p/go-libp2p-peerstore v0.8.0 h1:bzTG693TA1Ju/zKmUCQzDLSqiJnyRFVwPpuloZ/OZtI=
github.com/libp2p/go-libp2p-peerstore v0.8.0/go.mod h1:9geHWmNA3YDlQBjL/uPEJD6vpDK12aDNlUNHJ6kio/s=
github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0=
github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk=
github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA=
Expand Down
3 changes: 0 additions & 3 deletions head/head.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/ipfs/go-cid"
"github.com/ipfs/go-datastore"
"github.com/ipfs/go-ipns"
logging "github.com/ipfs/go-log"
"github.com/libp2p/go-libp2p"
dht "github.com/libp2p/go-libp2p-kad-dht"
"github.com/libp2p/go-libp2p-kad-dht/providers"
Expand Down Expand Up @@ -44,8 +43,6 @@ const (
provCacheExpiry = time.Hour
)

var log = logging.Logger("hydra/hydra")

// BootstrapStatus describes the status of connecting to a bootstrap node.
type BootstrapStatus struct {
Done bool
Expand Down
2 changes: 1 addition & 1 deletion head/head_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/ipfs/go-datastore"
"github.com/ipfs/go-datastore/sync"
"github.com/libp2p/go-libp2p-peerstore/pstoreds"
"github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoreds"
"github.com/libp2p/hydra-booster/head/opts"
hydratesting "github.com/libp2p/hydra-booster/testing"
)
Expand Down
2 changes: 1 addition & 1 deletion httpapi/httpapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (

cid "github.com/ipfs/go-cid"
dsq "github.com/ipfs/go-datastore/query"
"github.com/libp2p/go-libp2p-kad-dht/providers"
"github.com/libp2p/go-libp2p/core/crypto"
"github.com/libp2p/go-libp2p/core/network"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p-kad-dht/providers"
"github.com/libp2p/hydra-booster/hydra"
"github.com/libp2p/hydra-booster/idgen"
)
Expand Down
2 changes: 1 addition & 1 deletion hydra/hydra.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
leveldb "github.com/ipfs/go-ds-leveldb"
"github.com/ipfs/go-libipfs/routing/http/client"
"github.com/libp2p/go-libp2p-kad-dht/providers"
"github.com/libp2p/go-libp2p-peerstore/pstoreds"
"github.com/libp2p/go-libp2p/core/host"
"github.com/libp2p/go-libp2p/core/network"
"github.com/libp2p/go-libp2p/core/protocol"
"github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoreds"
hyds "github.com/libp2p/hydra-booster/datastore"
"github.com/libp2p/hydra-booster/head"
"github.com/libp2p/hydra-booster/head/opts"
Expand Down
2 changes: 1 addition & 1 deletion idgen/idgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"sync"
"sync/atomic"

kbucket "github.com/libp2p/go-libp2p-kbucket"
"github.com/libp2p/go-libp2p/core/crypto"
"github.com/libp2p/go-libp2p/core/peer"
kbucket "github.com/libp2p/go-libp2p-kbucket"
"golang.org/x/crypto/hkdf"
)

Expand Down
3 changes: 1 addition & 2 deletions metrics/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ var _ smithymiddle.FinalizeMiddleware = (*AWSMetricsMiddleware)(nil)
// Install the AWS metrics middleware onto an SDK stack.
// Typically you use this on a config object like this:
//
// awsCfg.APIOptions = append(awsCfg.APIOptions, metrics.AddAWSSDKMiddleware)
//
// awsCfg.APIOptions = append(awsCfg.APIOptions, metrics.AddAWSSDKMiddleware)
func AddAWSSDKMiddleware(stack *smithymiddle.Stack) error {
m := &AWSMetricsMiddleware{}
return stack.Finalize.Add(m, smithymiddle.Before)
Expand Down
5 changes: 3 additions & 2 deletions metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"github.com/ncabatoff/process-exporter/collector"
"github.com/ncabatoff/process-exporter/config"
prom "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/collectors"
necoll "github.com/prometheus/node_exporter/collector"
"go.opencensus.io/stats/view"
"go.opencensus.io/tag"
Expand Down Expand Up @@ -47,8 +48,8 @@
func ListenAndServe(address string) error {
// setup Prometheus
registry := prom.NewRegistry()
goCollector := prom.NewGoCollector()
procCollector := prom.NewProcessCollector(prom.ProcessCollectorOpts{})
goCollector := collectors.NewGoCollector()
procCollector := collectors.NewProcessCollector(collectors.ProcessCollectorOpts{})

Check warning on line 52 in metrics/metrics.go

View check run for this annotation

Codecov / codecov/patch

metrics/metrics.go#L51-L52

Added lines #L51 - L52 were not covered by tests

nodeCollector, err := necoll.NewNodeCollector(log.NewNopLogger())
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion providers/unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package providers
import (
"context"

"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p-kad-dht/providers"
"github.com/libp2p/go-libp2p/core/peer"
)

func AddProviderNotSupported(backend providers.ProviderStore) providers.ProviderStore {
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.7.4"
}
Loading