| 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: [3.6, 3.7, 3.8, 3.9] | |
| os: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools | |
| pip install urllib3 certifi pytz pyflakes faker nose | |
| - name: Run check | |
| run: | | |
| export PATH=${HOME}/.local/bin:${PATH} | |
| make check | |
| - name: Test with nosetests | |
| run: | | |
| pyflakes minio/*.py || true | |
| 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: 1 | |
| MINIO_ACCESS_KEY: minio | |
| MINIO_SECRET_KEY: minio123 | |
| SSL_CERT_FILE: /tmp/minio-config/certs/public.crt | |
| run: | | |
| wget --quiet -O /tmp/minio https://dl.min.io/server/minio/release/linux-amd64/minio | |
| chmod +x /tmp/minio | |
| mkdir -p /tmp/minio-config/certs/ | |
| cp tests/certs/* /tmp/minio-config/certs/ | |
| /tmp/minio -C /tmp/minio-config server /tmp/fs{1...4} & | |
| python tests/functional/tests.py | |