Skip to content

Commit 9a363a9

Browse files
bors[bot]alallema
andauthored
Merge #103
103: Add pre-release tests in github action r=curquiza a=alallema Co-authored-by: alallema <[email protected]>
2 parents 09d9fc4 + 67d1ff8 commit 9a363a9

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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:
8+
- bump-meilisearch-v*
9+
pull_request:
10+
branches:
11+
- bump-meilisearch-v*
12+
13+
jobs:
14+
integration-tests:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
php-versions: ['7.4', '8.0']
19+
name: integration-tests-against-rc (PHP ${{ matrix.php-versions }})
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Install PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php-versions }}
26+
- name: Validate composer.json and composer.lock
27+
run: composer validate
28+
- name: Install dependencies
29+
run: composer install --prefer-dist --no-progress --quiet
30+
- name: Get the latest MeiliSearch RC
31+
run: echo "MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | bash)" >> $GITHUB_ENV
32+
- name: MeiliSearch (${{ env.MEILISEARCH_VERSION }}) setup with Docker
33+
run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ env.MEILISEARCH_VERSION }} ./meilisearch --master-key=masterKey --no-analytics=true
34+
- name: Run test suite
35+
run: composer test:unit

.github/workflows/tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111

1212
jobs:
1313
integration-tests:
14+
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
15+
# Will still run for each push to bump-meilisearch-v*
16+
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
1417
runs-on: ubuntu-latest
1518
strategy:
1619
matrix:
@@ -28,8 +31,6 @@ jobs:
2831
run: composer install --prefer-dist --no-progress --quiet
2932
- name: MeiliSearch setup with Docker
3033
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey --no-analytics=true
31-
- name: Check
32-
run: curl http://127.0.0.1:7700
3334
- name: Run test suite
3435
run: composer test:unit
3536

0 commit comments

Comments
 (0)