diff --git a/.editorconfig b/.editorconfig index d1e833f8..98058029 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,7 +14,7 @@ indent_style = space indent_style = tab indent_size = 8 -[*{.yaml, yml}] +[*.{yaml,yml}] indent_size = 2 indent_style = space diff --git a/.github/workflows/pre-release-tests.yml b/.github/workflows/pre-release-tests.yml new file mode 100644 index 00000000..ba43cff1 --- /dev/null +++ b/.github/workflows/pre-release-tests.yml @@ -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 ./... diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e2c89b81..8aadfcd9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -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 diff --git a/bors.toml b/bors.toml index 35ca7656..b2dc70ab 100644 --- a/bors.toml +++ b/bors.toml @@ -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