mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
test bolt and memory provider on macOS and Windows too
This commit is contained in:
40
.github/workflows/development.yml
vendored
40
.github/workflows/development.yml
vendored
@@ -41,14 +41,15 @@ jobs:
|
|||||||
- name: Initialize data provider
|
- name: Initialize data provider
|
||||||
run: ./sftpgo initprovider
|
run: ./sftpgo initprovider
|
||||||
|
|
||||||
- name: Run test cases using SQLite as data provider
|
- name: Run test cases using SQLite provider
|
||||||
run: go test -v ./... -coverprofile=coverage.txt -covermode=atomic
|
run: go test -v ./... -coverprofile=coverage.txt -covermode=atomic
|
||||||
|
|
||||||
- name: Upload to Codecov
|
- name: Upload to Codecov
|
||||||
|
if: ${{ matrix.go == '1.14' }}
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v1
|
||||||
with:
|
with:
|
||||||
file: ./coverage.txt
|
file: ./coverage.txt
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: false
|
||||||
|
|
||||||
- name: Prepare artifact
|
- name: Prepare artifact
|
||||||
run: |
|
run: |
|
||||||
@@ -64,22 +65,22 @@ jobs:
|
|||||||
name: sftpgo-${{ matrix.os }}-go${{ matrix.go }}
|
name: sftpgo-${{ matrix.os }}-go${{ matrix.go }}
|
||||||
path: output
|
path: output
|
||||||
|
|
||||||
- name: Run test cases using bolt as data provider
|
- name: Run test cases using bolt provider
|
||||||
if: ${{ matrix.os == 'ubuntu-latest' && matrix.go == '1.14' }}
|
if: ${{ matrix.go == '1.14' }}
|
||||||
run: |
|
run: |
|
||||||
rm -f sftpgo.db
|
|
||||||
go test -v ./config -covermode=atomic
|
go test -v ./config -covermode=atomic
|
||||||
go test -v ./httpd -covermode=atomic
|
go test -v ./httpd -covermode=atomic
|
||||||
go test -v ./sftpd -covermode=atomic
|
go test -v ./sftpd -covermode=atomic
|
||||||
env:
|
env:
|
||||||
SFTPGO_DATA_PROVIDER__DRIVER: bolt
|
SFTPGO_DATA_PROVIDER__DRIVER: bolt
|
||||||
|
SFTPGO_DATA_PROVIDER__NAME: 'sftpgo_bolt.db'
|
||||||
|
|
||||||
- name: Run test cases using the memory data provider
|
- name: Run test cases using memory provider
|
||||||
if: ${{ matrix.os == 'ubuntu-latest' && matrix.go == '1.14' }}
|
if: ${{ matrix.go == '1.14' }}
|
||||||
run: go test -v ./... -covermode=atomic
|
run: go test -v ./... -covermode=atomic
|
||||||
env:
|
env:
|
||||||
SFTPGO_DATA_PROVIDER__DRIVER: memory
|
SFTPGO_DATA_PROVIDER__DRIVER: memory
|
||||||
SFTPGO_DATA_PROVIDER__NAME:
|
SFTPGO_DATA_PROVIDER__NAME: ''
|
||||||
|
|
||||||
tests-upload-windows:
|
tests-upload-windows:
|
||||||
name: Run tests and upload build artifact on Windows
|
name: Run tests and upload build artifact on Windows
|
||||||
@@ -101,7 +102,7 @@ jobs:
|
|||||||
- name: Initialize data provider
|
- name: Initialize data provider
|
||||||
run: .\sftpgo.exe initprovider
|
run: .\sftpgo.exe initprovider
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run test cases using SQLite provider
|
||||||
run: go test -v ./... -coverprofile=coverage.txt -covermode=atomic
|
run: go test -v ./... -coverprofile=coverage.txt -covermode=atomic
|
||||||
|
|
||||||
- name: Prepare artifact
|
- name: Prepare artifact
|
||||||
@@ -109,8 +110,10 @@ jobs:
|
|||||||
mkdir output
|
mkdir output
|
||||||
xcopy .\sftpgo.exe .\output
|
xcopy .\sftpgo.exe .\output
|
||||||
xcopy .\sftpgo.json .\output
|
xcopy .\sftpgo.json .\output
|
||||||
move .\templates .\output
|
mkdir output\templates
|
||||||
move .\static .\output
|
xcopy .\templates .\output\templates\ /E
|
||||||
|
mkdir output\static
|
||||||
|
xcopy .\static .\output\static\ /E
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
@@ -118,6 +121,21 @@ jobs:
|
|||||||
name: sftpgo-windows
|
name: sftpgo-windows
|
||||||
path: output
|
path: output
|
||||||
|
|
||||||
|
- name: Run test cases using bolt provider
|
||||||
|
run: |
|
||||||
|
go test -v ./config -covermode=atomic
|
||||||
|
go test -v ./httpd -covermode=atomic
|
||||||
|
go test -v ./sftpd -covermode=atomic
|
||||||
|
env:
|
||||||
|
SFTPGO_DATA_PROVIDER__DRIVER: bolt
|
||||||
|
SFTPGO_DATA_PROVIDER__NAME: 'sftpgo_bolt.db'
|
||||||
|
|
||||||
|
- name: Run test cases using memory provider
|
||||||
|
run: go test -v ./... -covermode=atomic
|
||||||
|
env:
|
||||||
|
SFTPGO_DATA_PROVIDER__DRIVER: memory
|
||||||
|
SFTPGO_DATA_PROVIDER__NAME: ''
|
||||||
|
|
||||||
tests-postgresql-mysql:
|
tests-postgresql-mysql:
|
||||||
name: Run test cases using PostgreSQL/MySQL data providers
|
name: Run test cases using PostgreSQL/MySQL data providers
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user