Skip to content

Commit b06d575

Browse files
committed
CI: Simplify workflow
1 parent 9a3d350 commit b06d575

File tree

1 file changed

+35
-38
lines changed

1 file changed

+35
-38
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
name: CI
22

33
on:
4-
- push
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types:
9+
- opened
10+
- synchronize
11+
- reopened
512

613
jobs:
714
test:
8-
name: Test
15+
name: ${{ matrix.os }}/ruby-${{ matrix.ruby }}/python-${{ matrix.python }}-${{ matrix.python_architecture }}
916
runs-on: ${{ matrix.os }}
1017

1118
strategy:
@@ -14,12 +21,12 @@ jobs:
1421
os:
1522
- ubuntu-18.04
1623
- macos-latest
17-
ruby_version:
18-
- 2.7.x
19-
- 2.6.x
20-
- 2.5.x
21-
- 2.4.x
22-
python_version:
24+
ruby:
25+
- 2.7
26+
- 2.6
27+
- 2.5
28+
- 2.4
29+
python:
2330
- 3.8.x
2431
- 3.7.x
2532
- 3.6.x
@@ -28,40 +35,30 @@ jobs:
2835
- x64
2936

3037
steps:
31-
- name: Setup Ruby
32-
if: matrix.ruby_version != 'master-nightly'
33-
uses: actions/setup-ruby@v1
34-
with:
35-
ruby-version: ${{ matrix.ruby_version }}
38+
- uses: actions/checkout@v1
39+
with:
40+
fetch-depth: 1
41+
42+
- uses: ruby/setup-ruby@v1
43+
if: matrix.ruby_version != 'master-nightly'
44+
with:
45+
ruby-version: ${{ matrix.ruby }}
3646

37-
- name: Setup Python
38-
uses: actions/setup-python@v1
39-
with:
40-
python-version: ${{ matrix.python_version }}
41-
architecture: ${{ matrix.python_architecture }}
47+
- uses: actions/setup-python@v1
48+
with:
49+
python-version: ${{ matrix.python }}
50+
architecture: ${{ matrix.python_architecture }}
4251

43-
- name: Checkout
44-
uses: actions/checkout@v1
45-
with:
46-
fetch-depth: 1
52+
- run: gem install bundler
4753

48-
- name: Prepare environment
49-
run: |
50-
gem install bundler
54+
- run: pip install --user numpy
5155

52-
- name: Install requirements
53-
run: |
54-
pip install --user numpy
55-
bundle install
56+
- run: bundle install
5657

57-
- name: Compile pycall.so
58-
run: |
59-
bundle exec rake compile
58+
- run: bundle exec rake compile
6059

61-
- name: Python investigator
62-
run: |
63-
python lib/pycall/python/investigator.py
60+
- run: python lib/pycall/python/investigator.py
6461

65-
- name: Test
66-
run: |
67-
PYTHON=python bundle exec rake
62+
- run: bundle exec rake
63+
env:
64+
PYTHON: python

0 commit comments

Comments
 (0)