|
| 1 | +name: Integration tests, linux |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + types: [opened, synchronize] |
| 6 | + push: |
| 7 | + branches: |
| 8 | + - main |
| 9 | + |
| 10 | +jobs: |
| 11 | + integration_tests: |
| 12 | + name: ${{ matrix.python_version }} unit ${{matrix.command}} tests |
| 13 | + runs-on: ubuntu-latest |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + include: |
| 18 | + - python_version: "3.9" |
| 19 | + command: 'git-test-integration' |
| 20 | + |
| 21 | + steps: |
| 22 | + - name: Set up Python ${{ matrix.python_version }} |
| 23 | + uses: actions/setup-python@v4 |
| 24 | + with: |
| 25 | + python-version: ${{ matrix.python_version }} |
| 26 | + - name: Checkout repository |
| 27 | + uses: actions/checkout@v3 |
| 28 | + with: |
| 29 | + ref: ${{ github.event.pull_request.head.ref }} |
| 30 | + repository: ${{ github.event.pull_request.head.repo.full_name }} |
| 31 | + fetch-depth: 2 |
| 32 | + - name: Installing Dependencies |
| 33 | + run: | |
| 34 | + pip install virtualenv |
| 35 | + virtualenv test_python -q |
| 36 | + source test_python/bin/activate |
| 37 | + make installdeps |
| 38 | + make installdeps-test |
| 39 | + pip freeze |
| 40 | + - name: Erase Coverage |
| 41 | + run: | |
| 42 | + source test_python/bin/activate |
| 43 | + coverage erase |
| 44 | + - name: Run integration tests |
| 45 | + run: | |
| 46 | + source test_python/bin/activate |
| 47 | + make ${{matrix.command}} |
| 48 | + - name: Upload pytest duration artifact |
| 49 | + uses: actions/upload-artifact@v2 |
| 50 | + with: |
| 51 | + name: pytest-duration-report |
| 52 | + path: test-reports/${{matrix.command}}-junit.xml |
| 53 | + - name: install coverage |
| 54 | + run: pip install "coverage[toml]" |
| 55 | + - name: Upload coverage to Codecov |
| 56 | + uses: codecov/codecov-action@v3 |
| 57 | + with: |
| 58 | + token: ${{ secrets.REPO_SCOPED_TOKEN }} |
| 59 | + fail_ci_if_error: true |
0 commit comments