|
6 | 6 | workflow_dispatch: |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - linux: |
| 9 | + tests: |
10 | 10 | # We want to run on external PRs, but not on our own internal |
11 | 11 | # PRs as they'll be run by the push to the branch. |
12 | 12 | # |
|
21 | 21 | - 'debug-master' |
22 | 22 | include: |
23 | 23 | - tarantool: '3.1' |
24 | | - coveralls: true |
25 | 24 | env: |
26 | 25 | TNT_DEBUG_PATH: /home/runner/tnt-debug |
27 | 26 |
|
@@ -49,15 +48,60 @@ jobs: |
49 | 48 | key: "cache-rocks-${{ matrix.tarantool }}${{ env.VERSION_POSTFIX }}" |
50 | 49 |
|
51 | 50 | - name: Install requirements |
52 | | - run: make deps depname=coverage |
| 51 | + run: make deps depname=test |
53 | 52 | if: steps.cache-rocks.outputs.cache-hit != 'true' |
54 | 53 |
|
55 | 54 | - run: echo $PWD/.rocks/bin >> $GITHUB_PATH |
56 | 55 |
|
57 | 56 | - run: make test |
58 | 57 |
|
| 58 | + coverage: |
| 59 | + # We want to run on external PRs, but not on our own internal |
| 60 | + # PRs as they'll be run by the push to the branch. |
| 61 | + # |
| 62 | + # The main trick is described here: |
| 63 | + # https://github.com/Dart-Code/Dart-Code/pull/2375 |
| 64 | + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
| 65 | + |
| 66 | + strategy: |
| 67 | + fail-fast: false |
| 68 | + |
| 69 | + env: |
| 70 | + TNT_DEBUG_PATH: /home/runner/tnt-debug |
| 71 | + |
| 72 | + runs-on: ubuntu-22.04 |
| 73 | + steps: |
| 74 | + - name: Clone the module |
| 75 | + uses: actions/checkout@v3 |
| 76 | + |
| 77 | + - name: Setup tt |
| 78 | + run: | |
| 79 | + curl -L https://tarantool.io/release/3/installer.sh | bash |
| 80 | + sudo apt install -y tt |
| 81 | + tt version |
| 82 | +
|
| 83 | + - name: Install Tarantool |
| 84 | + uses: ./.github/actions/install-tarantool |
| 85 | + with: |
| 86 | + tarantool: '3.1' |
| 87 | + |
| 88 | + - name: Cache rocks |
| 89 | + uses: actions/cache@v3 |
| 90 | + id: cache-rocks |
| 91 | + with: |
| 92 | + path: .rocks/ |
| 93 | + key: "cache-rocks-3.1${{ env.VERSION_POSTFIX }}" |
| 94 | + |
| 95 | + - name: Install requirements |
| 96 | + run: make deps depname=coverage |
| 97 | + if: steps.cache-rocks.outputs.cache-hit != 'true' |
| 98 | + |
| 99 | + - run: echo $PWD/.rocks/bin >> $GITHUB_PATH |
| 100 | + |
| 101 | + - name: Run tests with coverage |
| 102 | + run: make test-coverage |
| 103 | + |
59 | 104 | - name: Send code coverage to 'coveralls.io' |
60 | 105 | run: make coveralls |
61 | | - if: ${{ matrix.coveralls }} |
62 | 106 | env: |
63 | 107 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments