-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (52 loc) · 1.44 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
53
54
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@v2
- name: build container
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: false
rubocop:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v2
- name: lint code with rubocop
uses: andrewmcodes/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tests:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [2.0, 2.3, 2.7, 3.0]
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: set up ruby environment
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: checkout repo
uses: actions/checkout@v2
- name: install ruby dependencies
run: |
gem install bundler
bundle install
- name: build the extension
run: bundle exec rake compile
- name: run the tests
run: bundle exec rspec