-
Notifications
You must be signed in to change notification settings - Fork 44
63 lines (59 loc) · 1.86 KB
/
tests.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
name: Tests
on:
pull_request:
push:
# trying and staging branches are for BORS config
branches:
- trying
- staging
- main
jobs:
integration_tests:
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
# Will still run for each push to bump-meilisearch-v*
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
strategy:
fail-fast: false
matrix:
ruby-version: ['3.1', '3.2', '3.3']
name: integration-tests (ruby ${{ matrix.ruby-version }})
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Install ruby dependencies
run: bundle install --with test
- name: Meilisearch (latest) setup with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --master-key=masterKey --no-analytics
- name: Run test suite
run: bundle exec rspec
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
if: matrix.ruby-version == '3.3'
with:
token: ${{ secrets.CODECOV_TOKEN }}
linter_check:
name: linter-check
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
- name: Install ruby dependencies
run: bundle install --with test
- name: Run linter
run: bundle exec rubocop lib/ spec/
yaml-lint:
name: Yaml linting check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Yaml lint check
uses: ibiqlik/action-yamllint@v3
with:
config_file: .yamllint.yml