|
| 1 | +name: Run tests |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - master |
| 6 | + - 4.*.z |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - master |
| 10 | + - 4.*.z |
| 11 | +jobs: |
| 12 | + run-tests: |
| 13 | + runs-on: ${{ matrix.os }} |
| 14 | + name: Run tests with Python ${{ matrix.python-version }} on ${{ matrix.os }} |
| 15 | + strategy: |
| 16 | + matrix: |
| 17 | + python-version: [ 2.7, 3.9 ] |
| 18 | + os: [ ubuntu-latest, windows-latest ] |
| 19 | + fail-fast: false |
| 20 | + steps: |
| 21 | + - name: Setup Python |
| 22 | + uses: actions/setup-python@v2 |
| 23 | + with: |
| 24 | + python-version: ${{ matrix.python-version }} |
| 25 | + - name: Install JDK |
| 26 | + uses: actions/setup-java@v2 |
| 27 | + with: |
| 28 | + distribution: 'adopt' |
| 29 | + java-version: '8' |
| 30 | + - name: Checkout to code |
| 31 | + uses: actions/checkout@v2 |
| 32 | + - name: Install dependencies |
| 33 | + run: | |
| 34 | + pip install -r requirements-test.txt |
| 35 | + - name: Run tests |
| 36 | + env: |
| 37 | + HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }} |
| 38 | + run: python run_tests.py |
| 39 | + - name: Upload remote controller logs on test failure |
| 40 | + uses: actions/upload-artifact@v2 |
| 41 | + if: failure() |
| 42 | + with: |
| 43 | + name: rc-logs-${{ matrix.python-version }}-${{ matrix.os }} |
| 44 | + path: | |
| 45 | + rc_stderr.log |
| 46 | + rc_stdout.log |
| 47 | + - name: Publish results to Codecov |
| 48 | + uses: codecov/codecov-action@v1 |
| 49 | + with: |
| 50 | + files: ./coverage.xml |
| 51 | + run-linter: |
| 52 | + runs-on: ubuntu-latest |
| 53 | + name: Run black to check the code style |
| 54 | + steps: |
| 55 | + - name: Setup Python |
| 56 | + uses: actions/setup-python@v2 |
| 57 | + with: |
| 58 | + python-version: 3.9 |
| 59 | + - name: Checkout to code |
| 60 | + uses: actions/checkout@v2 |
| 61 | + - name: Install dependencies |
| 62 | + run: | |
| 63 | + pip install -r requirements-dev.txt |
| 64 | + - name: Run black |
| 65 | + run: | |
| 66 | + black --check --config black.toml . |
| 67 | + generate_docs: |
| 68 | + runs-on: ubuntu-latest |
| 69 | + name: Generate documentation |
| 70 | + steps: |
| 71 | + - name: Setup Python |
| 72 | + uses: actions/setup-python@v2 |
| 73 | + with: |
| 74 | + python-version: 3.9 |
| 75 | + - name: Checkout to code |
| 76 | + uses: actions/checkout@v2 |
| 77 | + - name: Install dependencies |
| 78 | + run: | |
| 79 | + pip install -r requirements-dev.txt |
| 80 | + - name: Generate documentation |
| 81 | + working-directory: docs |
| 82 | + run: | |
| 83 | + make html SPHINXOPTS="-W --keep-going" |
0 commit comments