Update github actions. Add ruby 3.2.0 to test matrix, use latest OS versions.
name: CI
-on: [push, pull_request, workflow_dispatch]
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
jobs:
build:
@@ -16,26 +20,20 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [ ubuntu-20.04, ubuntu-18.04, macos-11, windows-2022 ]
- ruby: [ 3.1, '3.0', 2.7 ]
-
+ os: [ubuntu-latest, macos-latest, windows-latest]
+ ruby: ['2.7', '3.0', '3.1', '3.2']
steps:
- - name: repo checkout
- uses: actions/checkout@v2
-
- - name: load ruby
- uses: MSP-Greg/setup-ruby-pkgs@v1
+ - uses: actions/checkout@v3
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
apt-get: libxml2-dev
# brew: libxml2
mingw: libxml2
- bundler-cache: true
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
timeout-minutes: 10
-
- - name: compile
+ - name: Build
run: bundle exec rake compile
-
- - name: test
- timeout-minutes: 10
+ - name: Test
run: bundle exec rake test
