forked from kubernetes-sigs/nat64
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (71 loc) · 1.99 KB
/
bats.yml
File metadata and controls
77 lines (71 loc) · 1.99 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: bats
on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
branches: [ main ]
workflow_dispatch:
env:
GO_VERSION: "1.23"
K8S_VERSION: "v1.32.0"
KIND_VERSION: "v0.26.0"
REGISTRY: registry.k8s.io
IMAGE_NAME: networking/nat64
KIND_CLUSTER_NAME: kind
jobs:
bats_e2e_tests:
runs-on: ubuntu-latest
name: Bats e2e tests
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Enable ICMP
shell: bash
run: |
echo 'net.ipv4.ping_group_range = 0 2147483647' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
- name: Setup Bats and bats libs
id: setup-bats
uses: bats-core/bats-action@3.0.0
- name: Bats tests
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TERM: xterm
run: mkdir -p _artifacts && bats -o _artifacts tests/e2e/
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }}
path: ./_artifacts
bats_integration_tests:
runs-on: ubuntu-latest
name: Bats integrations tests
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Bats and bats libs
id: setup-bats
uses: bats-core/bats-action@3.0.0
- name: Set up environment
shell: bash
run: |
echo 'net.ipv4.ping_group_range = 0 2147483647' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
sudo apt-get install socat
- name: Bats tests
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TERM: xterm
run: mkdir -p _artifacts && bats -o _artifacts tests/integration/
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: integration-logs-${{ env.JOB_NAME }}-${{ github.run_id }}
path: ./_artifacts