Skip to content

Commit

Permalink
test: setup integration test in github workflow (#19)
Browse files Browse the repository at this point in the history
* github workflow

* fix workflow
  • Loading branch information
xiongjiwei authored Aug 30, 2021
1 parent 722ec1d commit 925204b
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Integration Test"

on: [push, pull_request]

jobs:
integration_test:
name: Integration Test
runs-on: ${{ matrix.os }}
env:
STORAGE_FTP_INTEGRATION_TEST: on
STORAGE_FTP_CREDENTIAL: basic:anonymous:password
STORAGE_FTP_ENDPOINT: tcp:127.0.0.1:2121

strategy:
matrix:
go: ["1.15", "1.16"]
os: [ubuntu-latest]

steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: Checkout beyong-ftp repository
uses: actions/checkout@v2
with:
path: beyond-ftp

- name: Checkout go-service-ftp repository
uses: actions/checkout@v2
with:
repository: beyondstorage/go-service-ftp
path: go-service-ftp

- name: Build
run: cd beyond-ftp && make build

- name: Start FTP server
run: cd beyond-ftp && bin/beyond-ftp &

- name: Integration Test
run: cd go-service-ftp && make integration_test
2 changes: 1 addition & 1 deletion config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ service = "memory:///ftp"
host = "localhost"

# FTP server port.
port = 21
port = 2121

# FTP server passive connection host.
public-host = "127.0.0.1"
Expand Down

0 comments on commit 925204b

Please sign in to comment.