-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (105 loc) · 3.05 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Copyright (C) 2025 Ruby-GNOME Project Team
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
name: Test
on:
- push
- pull_request
jobs:
unit:
name: Unit
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ruby
bundler-cache: true
- name: Test
run: |
bundle exec test/run.rb
docker:
name: ${{ matrix.distribution }}
strategy:
fail-fast: false
matrix:
distribution:
- almalinux-9
- alpine-linux
- alt-linux
- amazon-linux-2
- amazon-linux-2023
- arch-linux
- conda
- debian-bookworm
- fedora
- gentoo-linux
- opensuse
- pld-linux
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Prepare cache for Gentoo Linux
if: |
matrix.distribution == 'gentoo-linux'
run: |
docker pull gentoo/portage
gentoo_portage_id=$(docker image inspect gentoo/portage | jq -r ".[0].Id")
echo "GENTOO_PORTAGE_ID=${gentoo_portage_id}" >> "${GITHUB_ENV}"
- name: Cache binary packages for Gentoo Linux
if: |
matrix.distribution == 'gentoo-linux'
uses: actions/cache@v4
with:
path: .cache
key: ${{ matrix.distribution }}-${{ env.GENTOO_PORTAGE_ID }}
restore-keys: ${{ matrix.distribution }}-
- name: Build Docker image
run: |
docker compose build ${{ matrix.distribution }}
- name: Run
run: |
docker compose run --rm ${{ matrix.distribution }}
native:
name: ${{ matrix.ruby-version }} on ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on:
- macos
- ubuntu
ruby-version:
- "3.4"
- "3.3"
- "3.2"
- "3.1"
runs-on: ${{ matrix.runs-on }}-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Install
run: rake install
- name: Install dummy-cairo gem
run: |
cd test/fixture/dummy-cairo
gem build *.gemspec
gem install ./*.gem