-
Notifications
You must be signed in to change notification settings - Fork 18
73 lines (61 loc) · 1.66 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
name: Build and Test
on:
push:
branches:
- master
- staging
- trying
- 'prepare-*'
pull_request:
branches:
- '**'
jobs:
test:
name: Build and Test
strategy:
matrix:
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2']
target:
- id: 'linux-amd64'
os: 'ubuntu-latest'
target-name: 'x86_64-unknown-linux-gnu'
rust-toolchain: 'stable'
- id: 'darwin-amd64'
os: 'macos-latest'
target-name: 'x86_64-apple-darwin'
rust-toolchain: 'stable'
# As soon as one job fails in the matrix, all the other
# in-progress jobs are canceled.
fail-fast: false
runs-on: ${{ matrix.target.os }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.target.rust-toolchain }}
default: true
override: true
target: ${{ matrix.target.target-name }}
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Set up just
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
test -f $HOME/.cargo/bin/just || cargo install just
- name: Compile the library
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
gem install rake
gem install bundler
just build
- name: Run the tests
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
just test-all