-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (77 loc) · 1.91 KB
/
e2e.yaml
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
78
79
80
name: Run E2E Test Suites
on:
push:
branches:
- main
- release/**
pull_request:
branches:
- main
- release/**
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
token: ${{ secrets.GITHUB_TOKEN }}
filters: |
src:
- '*.go'
- '**/*.go'
- 'go.mod'
- 'go.sum'
- 'Makefile'
- '.github/**'
- 'internal/**'
- 'svc/**'
- 'core/**'
run-test:
needs: changes
if: |
(needs.changes.outputs.src == 'true')
runs-on: ubuntu-latest
timeout-minutes: 20
services:
etcd:
image: bitnami/etcd:3.4.0
ports:
- 2379:2379
- 2380:2380
env:
ALLOW_NONE_AUTHENTICATION: yes
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Go Environment
uses: actions/setup-go@v3
with:
go-version: '1.20.3'
- name: Install ginkgo
run: |
go install github.com/onsi/ginkgo/v2/ginkgo@latest
sudo cp ~/go/bin/ginkgo /usr/local/bin
- name: Run E2E Test Suites
working-directory: ./
run: |
export PATH=$PWD/bin:$PATH
make build
make e2e