Skip to content

Commit 8a94073

Browse files
mprycclaude
andcommitted
UPSTREAM: <carry>: Update lint and test workflows for downstream
- Update branch filters from master to oadp-dev/oadp-1.* - Trim OS matrix to ubuntu-latest only - Remove Windows/macOS-specific install steps - Remove scheduled CI runs - Remove ci-integration-tests (uses upstream kopia commands) Signed-off-by: Michal Pryc <mpryc@redhat.com> Co-authored-by: Michal Pryc <mpryc@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 06e5737 commit 8a94073

3 files changed

Lines changed: 10 additions & 35 deletions

File tree

.github/workflows/lint.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Lint
22
on:
33
pull_request:
4-
branches: [ master ]
4+
branches: [ oadp-dev, oadp-1.* ]
55
concurrency:
66
group: ${{ github.workflow }}-${{ github.ref }}
77
cancel-in-progress: true
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
os: [ubuntu-latest, macos-latest]
24+
os: [ubuntu-latest]
2525
name: Lint
2626
runs-on: ${{ matrix.os }}
2727
steps:
@@ -33,19 +33,5 @@ jobs:
3333
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
3434
with:
3535
go-version-file: 'go.mod'
36-
- id: govulncheck
37-
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4
38-
with:
39-
cache: false
40-
go-version-input: '1.25.4'
41-
# An explicit Go version is needed for govulncheck-action since internally
42-
# it uses an outdated setup-go@v5.0 action that does not respect the 'toolchain'
43-
# directive in the 'go.mod' file.
44-
#go-version-file: 'go.mod'
45-
repo-checkout: false
4636
- name: Lint
4737
run: make lint
48-
- name: Check Locks
49-
run: make check-locks
50-
- name: Prettier
51-
run: make check-prettier

.github/workflows/tests.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
name: Tests
22
on:
33
pull_request:
4-
branches: [ master ]
4+
branches: [ oadp-dev, oadp-1.* ]
55
push:
6-
# ci-sandbox is a branch dedicated to testing post-submit code.
7-
branches: [ master, artifacts-pr ]
6+
branches: [ oadp-dev, oadp-1.* ]
87
tags:
98
- v*
10-
schedule:
11-
# run on Mondays at 8AM
12-
- cron: '0 8 * * 1'
139
concurrency:
1410
group: ${{ github.workflow }}-${{ github.ref }}
1511
cancel-in-progress: true
@@ -29,7 +25,7 @@ jobs:
2925
strategy:
3026
fail-fast: false
3127
matrix:
32-
os: [windows-latest, ubuntu-latest, macos-latest, ubuntu-24.04-arm ]
28+
os: [ubuntu-latest]
3329
name: Tests
3430
runs-on: ${{ matrix.os }}
3531
steps:
@@ -41,20 +37,12 @@ jobs:
4137
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
4238
with:
4339
go-version-file: 'go.mod'
44-
- name: Install Windows-specific packages
45-
run: "choco install --no-progress -y make zip unzip curl"
46-
if: ${{ contains(matrix.os, 'windows') }}
47-
- name: Install macOS-specific packages
48-
run: "sudo xcode-select -r"
49-
if: ${{ contains(matrix.os, 'macos') }}
5040
- name: Setup
51-
run: make -j4 ci-setup
41+
run: make -j4 go-modules all-tools
5242
- name: Test Blob Index Manager V0
5343
run: make test-index-blob-v0
5444
- name: Tests
5545
run: make ci-tests
56-
- name: Integration Tests
57-
run: make -j2 ci-integration-tests
5846
- name: Upload Logs
5947
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
6048
with:

repo/blob/azure/patch.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ import (
55
"fmt"
66

77
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob"
8+
"github.com/pkg/errors"
9+
810
"github.com/kopia/kopia/internal/clock"
911
"github.com/kopia/kopia/repo/blob"
1012
"github.com/kopia/kopia/repo/blob/retrying"
11-
"github.com/pkg/errors"
1213
)
1314

14-
// NewWithClient creates new Azure backend storage with the specified client
15+
// NewWithClient creates new Azure backend storage with the specified client.
1516
func NewWithClient(ctx context.Context, opt *Options, client *azblob.Client) (blob.Storage, error) {
1617
raw := &azStorage{
1718
Options: *opt,
@@ -24,7 +25,7 @@ func NewWithClient(ctx context.Context, opt *Options, client *azblob.Client) (bl
2425
// verify Azure connection is functional by listing blobs in a bucket, which will fail if the container
2526
// does not exist. We list with a prefix that will not exist, to avoid iterating through any objects.
2627
nonExistentPrefix := fmt.Sprintf("kopia-azure-storage-initializing-%v", clock.Now().UnixNano())
27-
if err := raw.ListBlobs(ctx, blob.ID(nonExistentPrefix), func(md blob.Metadata) error {
28+
if err := raw.ListBlobs(ctx, blob.ID(nonExistentPrefix), func(_ blob.Metadata) error {
2829
return nil
2930
}); err != nil {
3031
return nil, errors.Wrap(err, "unable to list from the bucket")

0 commit comments

Comments
 (0)