-
Notifications
You must be signed in to change notification settings - Fork 33
53 lines (42 loc) · 1.28 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Test with Kind
on: push
env:
KIND_VERSION: v0.20.0
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Lint
run: |
gofmt -l -s $(find . -type f -name '*.go')
if [[ -n $(gofmt -l -s $(find . -type f -name '*.go')) ]]; then exit 1; fi
- name: Install kind
run: |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/${{ env.KIND_VERSION }}/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
- name: Create kind cluster
run: |
kind create cluster
- name: Set up kubectl
run: |
kubectl cluster-info --context kind-kind
kubectl get nodes
- name: Build and test
run: |
make build
make test
- name: Run a single focused test
run: |
bin/hydrophone --focus 'Simple pod should contain last line of the log' --output-dir ${{ github.workspace }}/results/
- name: Archive conformance results
uses: actions/upload-artifact@v3
with:
name: conformance-results
path: ${{ github.workspace }}/results/