From 925204b5ea061fbd3c83ea7a36e949909179e4fc Mon Sep 17 00:00:00 2001 From: xiongjiwei Date: Mon, 30 Aug 2021 09:56:44 +0800 Subject: [PATCH] test: setup integration test in github workflow (#19) * github workflow * fix workflow --- .github/workflows/integration-test.yml | 43 ++++++++++++++++++++++++++ config/config.example.toml | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/integration-test.yml diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml new file mode 100644 index 0000000..e725218 --- /dev/null +++ b/.github/workflows/integration-test.yml @@ -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 diff --git a/config/config.example.toml b/config/config.example.toml index fa6ac5e..b64200c 100644 --- a/config/config.example.toml +++ b/config/config.example.toml @@ -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"