mirror of
https://github.com/versity/versitygw.git
synced 2026-01-05 03:24:04 +00:00
add functional tests to github actions
This commit is contained in:
31
.github/workflows/functional.yml
vendored
Normal file
31
.github/workflows/functional.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: functional tests
|
||||
on: pull_request
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 'stable'
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
go get -v -t -d ./...
|
||||
|
||||
- name: Build
|
||||
run: make
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
mkdir /tmp/gw
|
||||
./versitygw -a user -s pass posix /tmp/gw &
|
||||
sleep 1
|
||||
./versitygw test -a user -s pass -e http://127.0.0.1:7070 full-flow
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -32,3 +32,4 @@ VERSION
|
||||
/versitygw.spec
|
||||
*.tar
|
||||
*.tar.gz
|
||||
/rand.data
|
||||
|
||||
@@ -285,6 +285,9 @@ func getAction(tf testFunc) func(*cli.Context) error {
|
||||
|
||||
fmt.Println()
|
||||
fmt.Println("RAN:", integration.RunCount, "PASS:", integration.PassCount, "FAIL:", integration.FailCount)
|
||||
if integration.FailCount > 0 {
|
||||
return fmt.Errorf("test failed with %v errors", integration.FailCount)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user