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