Skip to content

Commit

Permalink
Add CI for pre-releases
Browse files Browse the repository at this point in the history
  • Loading branch information
curquiza committed Nov 24, 2020
1 parent 3bd2ba6 commit 6b35b22
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ indent_style = space
indent_style = tab
indent_size = 8

[*{.yaml, yml}]
[*.{yaml,yml}]
indent_size = 2
indent_style = space

Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/pre-release-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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:
# Current go.mod version and latest stable go version
go: [1.12, 1.15]
include:
- go: 1.12
tag: current
- go: 1.15
tag: latest

name: integration-tests-against-rc (go ${{ matrix.tag }} version)
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Get the latest MeiliSearch RC
run: echo "MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/master/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 integration tests
run: go test -v ./...
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:

integration_tests:
runs-on: ubuntu-latest
# 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') != true
strategy:
matrix:
# Current go.mod version and latest stable go version
Expand All @@ -41,7 +44,7 @@ jobs:
- go: 1.15
tag: latest

name: integration-tests with go ${{ matrix.tag }} version
name: integration-tests (go ${{ matrix.tag }} version)
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v2
Expand Down
2 changes: 1 addition & 1 deletion bors.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
status = ['integration-tests with go current version', 'integration-tests with go latest version', 'linter']
status = ['integration-tests (go current version)', 'integration-tests (go latest version)', 'linter']
# 1 hour timeout
timeout-sec = 3600

0 comments on commit 6b35b22

Please sign in to comment.