Skip to content

Commit 885a4bd

Browse files
committed
CI: Migrate to GitHub Actions
1 parent 523fcb8 commit 885a4bd

File tree

2 files changed

+43
-10
lines changed

2 files changed

+43
-10
lines changed

.github/workflows/test.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
test:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
18+
ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4', '4.0']
19+
20+
name: Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }}
21+
steps:
22+
- uses: actions/checkout@v6
23+
- name: Set up Ruby
24+
uses: ruby/setup-ruby@v1
25+
with:
26+
ruby-version: ${{ matrix.ruby-version }}
27+
bundler-cache: true
28+
29+
- name: Replace libcurl.dll
30+
if: runner.os == 'Windows'
31+
run: |
32+
# The `libcurl.dll` bundled with Ruby on Windows (MSYS2) has missing dependencies and cannot be loaded by `ethon` out of the box. (Ref: https://github.com/typhoeus/typhoeus/issues/720)
33+
choco install curl --no-progress
34+
35+
$curlTools = "C:\ProgramData\chocolatey\lib\curl\tools"
36+
$srcDll = Get-ChildItem -Path $curlTools -Filter "libcurl*.dll" -Recurse | Select-Object -First 1
37+
38+
$rubyBin = Split-Path (Get-Command ruby.exe).Source
39+
$destDll = Join-Path $rubyBin "libcurl.dll"
40+
Copy-Item -Path $srcDll.FullName -Destination $destDll -Force
41+
42+
- name: Run tests
43+
run: bundle exec rake

.travis.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)