Skip to content

Add pre-release tests in github action #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/pre-release-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Testing the code base against the MeiliSearch pre-releases
name: Pre-Release Tests

# Will only run for PRs and pushes to bump-meilisearch-v*
on:
push:
branches:
- bump-meilisearch-v*
pull_request:
branches:
- bump-meilisearch-v*

jobs:
integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4', '8.0']
name: integration-tests-against-rc (PHP ${{ matrix.php-versions }})
steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer install --prefer-dist --no-progress --quiet
- name: Get the latest MeiliSearch RC
run: echo "MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | bash)" >> $GITHUB_ENV
- name: MeiliSearch (${{ env.MEILISEARCH_VERSION }}) setup with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ env.MEILISEARCH_VERSION }} ./meilisearch --master-key=masterKey --no-analytics=true
- name: Run test suite
run: composer test:unit
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:

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')
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -28,8 +31,6 @@ jobs:
run: composer install --prefer-dist --no-progress --quiet
- name: MeiliSearch setup with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey --no-analytics=true
- name: Check
run: curl http://127.0.0.1:7700
- name: Run test suite
run: composer test:unit

Expand Down