2022-03-22 16:03:15 +01:00
|
|
|
name: Unit Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2022-10-18 16:17:41 +02:00
|
|
|
- "release/**"
|
2022-09-03 17:47:47 +02:00
|
|
|
paths:
|
|
|
|
- "**.go"
|
2022-10-14 10:27:49 +02:00
|
|
|
- "**/go.mod"
|
|
|
|
- "**/go.sum"
|
2023-01-24 11:39:26 +01:00
|
|
|
- "**/testdata/**"
|
2023-02-14 20:01:00 +01:00
|
|
|
- ".github/workflows/test-unittest.yml"
|
2022-03-22 16:03:15 +01:00
|
|
|
pull_request:
|
2022-09-03 17:47:47 +02:00
|
|
|
paths:
|
2023-01-31 11:21:32 +01:00
|
|
|
- "cli/internal/helm/**"
|
2022-09-03 17:47:47 +02:00
|
|
|
- "**.go"
|
2022-10-14 10:27:49 +02:00
|
|
|
- "**/go.mod"
|
|
|
|
- "**/go.sum"
|
2023-01-24 11:39:26 +01:00
|
|
|
- "**/testdata/**"
|
2023-02-14 20:01:00 +01:00
|
|
|
- ".github/workflows/test-unittest.yml"
|
2022-03-22 16:03:15 +01:00
|
|
|
|
|
|
|
jobs:
|
2023-05-19 16:18:59 +02:00
|
|
|
test-unittest:
|
2023-05-19 16:56:22 +02:00
|
|
|
runs-on: [self-hosted, bazel-cached]
|
2022-03-22 16:03:15 +01:00
|
|
|
steps:
|
2022-07-20 10:48:01 +02:00
|
|
|
- name: Checkout
|
2023-07-03 08:19:10 +02:00
|
|
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
2022-09-19 10:59:46 +02:00
|
|
|
with:
|
2022-12-19 15:21:28 +01:00
|
|
|
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
|
2022-03-22 16:03:15 +01:00
|
|
|
|
2023-05-19 16:56:22 +02:00
|
|
|
- name: Setup bazel
|
|
|
|
uses: ./.github/actions/setup_bazel
|
2022-03-22 16:03:15 +01:00
|
|
|
with:
|
2023-05-19 16:56:22 +02:00
|
|
|
useCache: "true"
|
|
|
|
buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}
|
2022-05-31 18:33:27 +02:00
|
|
|
|
2022-06-30 13:26:21 +02:00
|
|
|
- name: Unit Tests
|
2022-10-31 19:25:02 +01:00
|
|
|
env:
|
|
|
|
TMPDIR: ${{ runner.temp }}
|
2023-05-19 16:56:22 +02:00
|
|
|
run: bazel test //... --test_output=errors --config=nostamp
|