|
| 1 | +name: Tests |
| 2 | +on: [push] |
| 3 | + |
| 4 | +jobs: |
| 5 | + run_tests: |
| 6 | + runs-on: ubuntu-latest |
| 7 | + strategy: |
| 8 | + matrix: |
| 9 | + python-version: [3.5, 3.6, 3.7, 3.8] |
| 10 | + steps: |
| 11 | + - uses: actions/checkout@v1 |
| 12 | + - name: Set up Python ${{ matrix.python-version }} |
| 13 | + uses: actions/setup-python@v1 |
| 14 | + with: |
| 15 | + python-version: ${{ matrix.python-version }} |
| 16 | + - name: Install dmenv |
| 17 | + uses: TankerHQ/dmenv-install-action@v1.0.0 |
| 18 | + with: |
| 19 | + dmenv-version: 0.20.0 |
| 20 | + - name: Prepare project for development |
| 21 | + run: dmenv install |
| 22 | + - name: Run tests |
| 23 | + run: dmenv run -- pytest |
| 24 | + |
| 25 | + python34: |
| 26 | + runs-on: ubuntu-16.04 |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@v1 |
| 29 | + - name: Set up Python 3.4 |
| 30 | + uses: actions/setup-python@v1 |
| 31 | + with: |
| 32 | + python-version: 3.4 |
| 33 | + - name: Install dmenv |
| 34 | + uses: TankerHQ/dmenv-install-action@v1.0.0 |
| 35 | + with: |
| 36 | + dmenv-version: 0.20.0 |
| 37 | + - name: Prepare project for development |
| 38 | + run: dmenv install |
| 39 | + - name: Run tests |
| 40 | + run: dmenv run -- pytest |
| 41 | + |
| 42 | + python2: |
| 43 | + runs-on: ubuntu-latest |
| 44 | + steps: |
| 45 | + - uses: actions/checkout@v1 |
| 46 | + - name: Set up Python 2.7 |
| 47 | + uses: actions/setup-python@v1 |
| 48 | + with: |
| 49 | + python-version: 2.7 |
| 50 | + - name: Install dependencies |
| 51 | + run: pip install -r requirements.lock |
| 52 | + - name: Run tests |
| 53 | + run: pytest |
| 54 | + |
| 55 | + coverage: |
| 56 | + runs-on: ubuntu-latest |
| 57 | + steps: |
| 58 | + - uses: actions/checkout@v1 |
| 59 | + - name: Set up Python 3.8 |
| 60 | + uses: actions/setup-python@v1 |
| 61 | + with: |
| 62 | + python-version: 3.8 |
| 63 | + - name: Install dmenv |
| 64 | + uses: TankerHQ/dmenv-install-action@v1.0.0 |
| 65 | + with: |
| 66 | + dmenv-version: 0.20.0 |
| 67 | + - name: Prepare project for development |
| 68 | + run: dmenv install |
| 69 | + - name: Run tests |
| 70 | + run: dmenv run -- pytest --cov=tankersdk_identity --cov-report=xml --cov-report=term |
| 71 | + - name: Send coverage |
| 72 | + run: dmenv run -- codecov |
| 73 | + env: |
| 74 | + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
0 commit comments