|
| 1 | +--- |
1 | 2 | # Copyright 2020 Redpanda Data, Inc. |
2 | 3 | # |
3 | 4 | # Use of this software is governed by the Business Source License |
|
6 | 7 | # As of the Change Date specified in that file, in accordance with |
7 | 8 | # the Business Source License, use of this software will be governed |
8 | 9 | # by the Apache License, Version 2.0 |
9 | | - |
10 | 10 | name: rpk |
11 | 11 | on: |
12 | 12 | push: |
13 | | - branches: |
14 | | - - 'dev' |
| 13 | + branches: [dev] |
15 | 14 | paths: |
16 | 15 | - 'src/go/rpk/**' |
17 | 16 | - '.github/workflows/rpk-build.yml' |
18 | 17 | pull_request: |
19 | 18 | paths: |
20 | 19 | - 'src/go/rpk/**' |
21 | 20 | - '.github/workflows/rpk-build.yml' |
22 | | - |
23 | 21 | jobs: |
| 22 | + build: |
| 23 | + strategy: |
| 24 | + matrix: |
| 25 | + goos: [linux, darwin, windows] |
| 26 | + goarch: [amd64, arm64] |
| 27 | + exclude: |
| 28 | + - goos: linux |
| 29 | + goarch: amd64 |
| 30 | + - goos: darwin |
| 31 | + goarch: arm64 |
| 32 | + runs-on: ubuntu-24.04 |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@v4 |
| 35 | + - uses: actions/setup-go@v5 |
| 36 | + with: |
| 37 | + go-version: stable |
| 38 | + cache-dependency-path: 'src/go/rpk/go.sum' |
| 39 | + - run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o rpk cmd/rpk/main.go |
| 40 | + working-directory: src/go/rpk/ |
24 | 41 | test: |
25 | | - name: Test rpk |
26 | 42 | strategy: |
27 | 43 | matrix: |
28 | | - os: [linux, darwin, windows] |
29 | | - arch: [amd64, arm64] |
30 | | - runs-on: ubuntu-latest |
| 44 | + runner: [ubuntu-24.04, macos-15] |
| 45 | + runs-on: ${{ matrix.runner }} |
31 | 46 | steps: |
32 | | - |
33 | | - - name: Check out code |
34 | | - uses: actions/checkout@v4 |
35 | | - |
36 | | - - name: Set up Go |
37 | | - uses: actions/setup-go@v5 |
| 47 | + - uses: actions/checkout@v4 |
| 48 | + - uses: actions/setup-go@v5 |
38 | 49 | with: |
39 | 50 | go-version: stable |
40 | 51 | cache-dependency-path: 'src/go/rpk/go.sum' |
41 | | - |
42 | | - - name: Run tests |
| 52 | + - run: go run gotest.tools/gotestsum@v1.12.0 -- -cover ./... |
43 | 53 | working-directory: src/go/rpk/ |
44 | | - run: go run gotest.tools/gotestsum@v1.11.0 -- -cover ./... |
|
0 commit comments