-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: More fixes for better support of Github CI
1. Explicity create and pass temporary directories in tests 2. Download Minio binary for both Linux & Windows and avoid testing directly against Play server
- Loading branch information
Showing
3 changed files
with
74 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Python package | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
name: Test on python ${{ matrix.python-version }} and ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 3 | ||
matrix: | ||
python-version: [2.7, 3.6, 3.7] | ||
os: [windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install urllib3 certifi pytz pyflakes faker nose wget | ||
- name: Test with nosetests | ||
run: | | ||
$ErrorActionPreference = 'continue' | ||
pyflakes minio/*.py | ||
python setup.py install | ||
python setup.py nosetests | ||
- name: Test with functional tests | ||
env: | ||
MINT_MODE: full | ||
SERVER_ENDPOINT: localhost:9000 | ||
ACCESS_KEY: minio | ||
SECRET_KEY: minio123 | ||
ENABLE_HTTPS: 0 | ||
MINIO_ACCESS_KEY: minio | ||
MINIO_SECRET_KEY: minio123 | ||
run: | | ||
Invoke-WebRequest -Uri https://dl.min.io/server/minio/release/windows-amd64/minio.exe -OutFile $HOME/minio.exe | ||
Start-Process -NoNewWindow -FilePath "$HOME/minio.exe" -ArgumentList "server", "$env:temp/data/xl/1", "$env:temp/data/xl/2", "$env:temp/data/xl/3", "$env:temp/data/xl/4" | ||
python tests/functional/tests.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters