-
Notifications
You must be signed in to change notification settings - Fork 56
106 lines (89 loc) · 2.46 KB
/
services-test-ftp.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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: "Services Test Ftp"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
on:
push:
paths:
- 'services/ftp/**'
tags-ignore:
- '**'
branches:
- '**'
pull_request:
paths:
- 'services/ftp/**'
jobs:
integration_test_1:
name: Service Test on fclairamb/ftpserver
runs-on: ubuntu-latest
strategy:
matrix:
go: [ "1.16", "1.17" ]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Checkout repository
uses: actions/checkout@v2
- name: Download ftpserver release
uses: robinraju/[email protected]
with:
repository: fclairamb/ftpserver
tag: v0.10.0
fileName: ftpserver-linux-amd64
out-file-path: services/ftp/tests/fclairamb-ftpserver
- name: Start ftp server
working-directory: services/ftp/tests/fclairamb-ftpserver
run: |
mkdir data
chmod +x ftpserver-linux-amd64
./ftpserver-linux-amd64 &
- name: Build
working-directory: services/ftp
run: make build
- name: Integration Test
working-directory: services/ftp
env:
STORAGE_FTP_INTEGRATION_TEST: on
STORAGE_FTP_CREDENTIAL: basic:user:password
STORAGE_FTP_ENDPOINT: tcp:127.0.0.1:2121
run: make integration_test
integration_test_2:
name: Service Test on vsftpd
runs-on: ubuntu-latest
strategy:
matrix:
go: [ "1.16", "1.17" ]
os: [ ubuntu-latest ]
services:
ftp:
image: fauria/vsftpd
ports:
- 2121:21
- 21000-22000:21000-22000
env:
FTP_USER: admin
FTP_PASS: admin
PASV_ADDRESS: 127.0.0.1
PASV_MIN_PORT: 21000
PASV_MAX_PORT: 22000
volumes:
- vsftpd-data:/home/vsftpd
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Checkout repository
uses: actions/checkout@v2
- name: Build
run: make build
- name: Integration Test
working-directory: services/ftp
env:
STORAGE_FTP_INTEGRATION_TEST: on
STORAGE_FTP_CREDENTIAL: basic:admin:admin
STORAGE_FTP_ENDPOINT: tcp:127.0.0.1:2121
run: make integration_test