Skip to content

Commit b9f2913

Browse files
committed
Add job for alpine
1 parent ce296bd commit b9f2913

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

.github/workflows/build.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,80 @@ jobs:
9797
webhook-url: ${{ secrets.SLACK_WEBHOOK }}
9898
matrix: ${{ toJson(matrix) }}
9999

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

@@ -236,6 +310,7 @@ jobs:
236310
notify:
237311
needs:
238312
- build-and-test
313+
- build-and-test-alpine
239314
- go-lint
240315
- ruby-lint
241316
- ruby-rbs

0 commit comments

Comments
 (0)