-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (50 loc) · 1.6 KB
/
main.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
name: CI build for the morandi-rb gem
on:
push:
pull_request:
branches: [ master ]
jobs:
build-dev:
runs-on: ubuntu-latest
name: ensures the dev environment image builds
steps:
- name: checkout repo
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: build container
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
context: .
file: ./Dockerfile
push: false
rubocop:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: lint code with rubocop
uses: andrewmcodes/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tests:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3']
name: install dependencies and run tests
steps:
- name: install image processing dependencies
run: |
sudo apt-get install -yqq liblcms2-utils libglib2.0-dev libgtk2.0-dev libgdk-pixbuf2.0-dev
- name: checkout repo
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: unlock the gem versions
run: rm Gemfile.lock
- name: set up ruby environment
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: build the extension
run: bundle exec rake compile
- name: run the tests
run: bundle exec rspec