Skip to content

Commit 5dde539

Browse files
authored
Add pre-release CI (#124)
1 parent a3ad362 commit 5dde539

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Testing the code base against the MeiliSearch pre-releases
2+
name: Pre-Release Tests
3+
4+
# Will only run for PRs and pushes to bump-meilisearch-v*
5+
on:
6+
push:
7+
branches: bump-meilisearch-v*
8+
pull_request:
9+
branches: bump-meilisearch-v*
10+
11+
jobs:
12+
integration_tests:
13+
name: integration-tests-against-rc
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v1
17+
- name: Set up Ruby 2.6
18+
uses: actions/setup-ruby@v1
19+
with:
20+
version: 2.6.x
21+
- name: Install ruby dependencies
22+
run: bundle install --with test
23+
- name: Get the latest MeiliSearch RC
24+
run: echo "MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/master/scripts/get-latest-meilisearch-rc.sh | bash)" >> $GITHUB_ENV
25+
- name: MeiliSearch (${{ env.MEILISEARCH_VERSION }}) setup with Docker
26+
run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ env.MEILISEARCH_VERSION }} ./meilisearch --master-key=masterKey --no-analytics=true
27+
- name: Run test suite
28+
run: bundle exec rspec

.github/workflows/tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,20 @@ on:
1212
jobs:
1313
integration_tests:
1414
name: integration-tests
15+
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
16+
# Will still run for each push to bump-meilisearch-v*
17+
if: github.event_name != 'pull_request' || startsWith(github.base_ref, 'bump-meilisearch-v') != true
1518
runs-on: ubuntu-latest
1619
steps:
1720
- uses: actions/checkout@v1
1821
- name: Set up Ruby 2.6
1922
uses: actions/setup-ruby@v1
2023
with:
2124
version: 2.6.x
22-
- name: MeiliSearch setup with Docker
23-
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey --no-analytics=true
2425
- name: Install ruby dependencies
2526
run: bundle install --with test
27+
- name: MeiliSearch (latest) setup with Docker
28+
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey --no-analytics=true
2629
- name: Run test suite
2730
run: bundle exec rspec
2831

0 commit comments

Comments
 (0)