|
96 | 96 | webhook-url: ${{ secrets.SLACK_WEBHOOK }}
|
97 | 97 | matrix: ${{ toJson(matrix) }}
|
98 | 98 |
|
| 99 | + build-and-test-alpine: |
| 100 | + name: "build-and-test-alpine (Go ${{ matrix.go }}, Ruby ${{ matrix.ruby }})" |
| 101 | + |
| 102 | + needs: |
| 103 | + - generate-matrix |
| 104 | + |
| 105 | + runs-on: ubuntu-latest |
| 106 | + |
| 107 | + container: "ruby:${{ matrix.ruby }}-alpine" |
| 108 | + |
| 109 | + strategy: |
| 110 | + fail-fast: false |
| 111 | + |
| 112 | + matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} |
| 113 | + |
| 114 | + steps: |
| 115 | + - uses: actions/checkout@v4 |
| 116 | + |
| 117 | + - uses: actions/setup-go@v5 |
| 118 | + with: |
| 119 | + go-version: ${{ matrix.go }} |
| 120 | + |
| 121 | + - run: apk update |
| 122 | + - run: apk add git alpine-sdk libffi-dev |
| 123 | + |
| 124 | + - name: bundle install |
| 125 | + run: | |
| 126 | + set -xe |
| 127 | + bundle config --local path vendor/bundle/ |
| 128 | + bundle install --jobs 4 |
| 129 | +
|
| 130 | + - name: Cache vendor/bundle |
| 131 | + uses: actions/cache@v4 |
| 132 | + with: |
| 133 | + path: vendor/bundle |
| 134 | + key: v1-alpine-${{ matrix.ruby }}-${{ github.sha }} |
| 135 | + restore-keys: | |
| 136 | + v1-alpine-${{ matrix.ruby }}- |
| 137 | +
|
| 138 | + - name: build and test (Go) |
| 139 | + run: | |
| 140 | + set -xe |
| 141 | + bundle exec rake go:test |
| 142 | + bundle exec rake go:testrace |
| 143 | +
|
| 144 | + - name: build and test (Ruby) |
| 145 | + run: bundle exec rake |
| 146 | + working-directory: ${{ env.TEST_GEM_DIR }} |
| 147 | + |
| 148 | + # FIXME: workaround for gcov2lcov warning |
| 149 | + - run: rm -rf vendor/ |
| 150 | + |
| 151 | + - name: Convert coverage to lcov |
| 152 | + uses: jandelgado/gcov2lcov-action@v1 |
| 153 | + with: |
| 154 | + infile: coverage.out |
| 155 | + outfile: coverage.lcov |
| 156 | + |
| 157 | + - name: Coveralls |
| 158 | + uses: coverallsapp/github-action@master |
| 159 | + with: |
| 160 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 161 | + path-to-lcov: coverage.lcov |
| 162 | + continue-on-error: true # NOTE: secrets cannot be obtained with forked repository PR |
| 163 | + |
| 164 | + - name: Slack Notification (not success) |
| 165 | + uses: act10ns/slack@v2 |
| 166 | + if: "! success()" |
| 167 | + continue-on-error: true |
| 168 | + with: |
| 169 | + status: ${{ job.status }} |
| 170 | + webhook-url: ${{ secrets.SLACK_WEBHOOK }} |
| 171 | + matrix: ${{ toJson(matrix) }} |
| 172 | + |
99 | 173 | go-lint:
|
100 | 174 | name: "go-lint (Ruby ${{ matrix.ruby }})"
|
101 | 175 |
|
@@ -235,6 +309,7 @@ jobs:
|
235 | 309 | notify:
|
236 | 310 | needs:
|
237 | 311 | - build-and-test
|
| 312 | + - build-and-test-alpine |
238 | 313 | - go-lint
|
239 | 314 | - ruby-lint
|
240 | 315 | - ruby-rbs
|
|
0 commit comments