Spaces:
Build error
Build error
Gouzi Mohaled
commited on
Commit
·
8d078f3
1
Parent(s):
99b43a7
Ajout du dossier .github
Browse files- .github/ISSUE_TEMPLATE/bug_report.md +42 -0
- .github/ISSUE_TEMPLATE/feature_request.md +20 -0
- .github/ISSUE_TEMPLATE/flaky_test.md +25 -0
- .github/PULL_REQUEST_TEMPLATE.md +19 -0
- .github/dependabot.yml +21 -0
- .github/workflows/codespell.yml +24 -0
- .github/workflows/dev-docker-image-build.yml +47 -0
- .github/workflows/dev-docker-image-prune.yml +25 -0
- .github/workflows/docker-image.yml +54 -0
- .github/workflows/integration-tests.yml +333 -0
- .github/workflows/release-artifacts.yml +176 -0
- .github/workflows/rust-lint.yml +43 -0
- .github/workflows/rust.yml +101 -0
- .github/workflows/storage-compat.yml +32 -0
.github/ISSUE_TEMPLATE/bug_report.md
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
name: Bug report
|
3 |
+
about: Create a report to help us improve
|
4 |
+
title: ''
|
5 |
+
labels: bug
|
6 |
+
assignees: ''
|
7 |
+
|
8 |
+
---
|
9 |
+
|
10 |
+
<!--- Provide a general summary of the issue in the Title above -->
|
11 |
+
|
12 |
+
## Current Behavior
|
13 |
+
<!--- Tell us what happens instead of the expected behavior -->
|
14 |
+
|
15 |
+
## Steps to Reproduce
|
16 |
+
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
|
17 |
+
<!--- reproduce this bug. Include code to reproduce, if relevant -->
|
18 |
+
1.
|
19 |
+
2.
|
20 |
+
3.
|
21 |
+
4.
|
22 |
+
|
23 |
+
<!--- Please make sure to include the data which could be used to reproduce the problem -->
|
24 |
+
|
25 |
+
|
26 |
+
## Expected Behavior
|
27 |
+
<!--- Tell us what should happen -->
|
28 |
+
|
29 |
+
## Possible Solution
|
30 |
+
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
|
31 |
+
|
32 |
+
## Context (Environment)
|
33 |
+
<!--- How has this issue affected you? What are you trying to accomplish? -->
|
34 |
+
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
|
35 |
+
|
36 |
+
<!--- Provide a general summary of the issue in the Title above -->
|
37 |
+
|
38 |
+
## Detailed Description
|
39 |
+
<!--- Provide a detailed description of the change or addition you are proposing -->
|
40 |
+
|
41 |
+
## Possible Implementation
|
42 |
+
<!--- Not obligatory, but suggest an idea for implementing addition or change -->
|
.github/ISSUE_TEMPLATE/feature_request.md
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
name: Feature request
|
3 |
+
about: Suggest an idea for this project
|
4 |
+
title: ''
|
5 |
+
labels: ''
|
6 |
+
assignees: ''
|
7 |
+
|
8 |
+
---
|
9 |
+
|
10 |
+
**Is your feature request related to a problem? Please describe.**
|
11 |
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
12 |
+
|
13 |
+
**Describe the solution you'd like**
|
14 |
+
A clear and concise description of what you want to happen.
|
15 |
+
|
16 |
+
**Describe alternatives you've considered**
|
17 |
+
A clear and concise description of any alternative solutions or features you've considered.
|
18 |
+
|
19 |
+
**Additional context**
|
20 |
+
Add any other context or screenshots about the feature request here.
|
.github/ISSUE_TEMPLATE/flaky_test.md
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: Flaky test `{{ env.TEST_NAME }}`
|
3 |
+
---
|
4 |
+
|
5 |
+
## Last report
|
6 |
+
|
7 |
+
### System error
|
8 |
+
|
9 |
+
```text
|
10 |
+
{{ env.SYSTEM_ERROR }}
|
11 |
+
```
|
12 |
+
|
13 |
+
### Context
|
14 |
+
|
15 |
+
Date: {{ date | date('DD.MM.YYYY HH:mm') }}
|
16 |
+
|
17 |
+
[Flaky failure run](https://github.com/{{ env.REPOSITORY }}/actions/runs/{{ env.RUN_ID }}/job/{{ env.JOB_ID }})
|
18 |
+
|
19 |
+
[Commit](https://github.com/{{ env.REPOSITORY }}/tree/{{ env.SHA }})
|
20 |
+
|
21 |
+
OS: {{ env.OS }}
|
22 |
+
|
23 |
+
Branch: {{ env.BRANCH }}
|
24 |
+
|
25 |
+
{{ env.PR }}
|
.github/PULL_REQUEST_TEMPLATE.md
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
### All Submissions:
|
2 |
+
|
3 |
+
* [ ] Contributions should target the `dev` branch. Did you create your branch from `dev`?
|
4 |
+
* [ ] Have you followed the guidelines in our Contributing document?
|
5 |
+
* [ ] Have you checked to ensure there aren't other open [Pull Requests](../../../pulls) for the same update/change?
|
6 |
+
|
7 |
+
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
|
8 |
+
|
9 |
+
### New Feature Submissions:
|
10 |
+
|
11 |
+
1. [ ] Does your submission pass tests?
|
12 |
+
2. [ ] Have you formatted your code locally using `cargo +nightly fmt --all` command prior to submission?
|
13 |
+
3. [ ] Have you checked your code using `cargo clippy --all --all-features` command?
|
14 |
+
|
15 |
+
### Changes to Core Features:
|
16 |
+
|
17 |
+
* [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
|
18 |
+
* [ ] Have you written new tests for your core changes, as applicable?
|
19 |
+
* [ ] Have you successfully ran tests with your changes locally?
|
.github/dependabot.yml
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
version: 2
|
2 |
+
updates:
|
3 |
+
- package-ecosystem: cargo
|
4 |
+
target-branch: "dev"
|
5 |
+
directory: /
|
6 |
+
schedule:
|
7 |
+
interval: weekly
|
8 |
+
open-pull-requests-limit: 10
|
9 |
+
labels: [dependencies]
|
10 |
+
- package-ecosystem: "github-actions"
|
11 |
+
target-branch: "dev"
|
12 |
+
directory: "/"
|
13 |
+
schedule:
|
14 |
+
interval: weekly
|
15 |
+
open-pull-requests-limit: 10
|
16 |
+
- package-ecosystem: docker
|
17 |
+
target-branch: "dev"
|
18 |
+
directory: "/"
|
19 |
+
schedule:
|
20 |
+
interval: weekly
|
21 |
+
open-pull-requests-limit: 10
|
.github/workflows/codespell.yml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
name: Codespell
|
3 |
+
|
4 |
+
on:
|
5 |
+
push:
|
6 |
+
branches: [dev,master]
|
7 |
+
pull_request:
|
8 |
+
branches: [dev,master]
|
9 |
+
|
10 |
+
permissions:
|
11 |
+
contents: read
|
12 |
+
|
13 |
+
jobs:
|
14 |
+
codespell:
|
15 |
+
name: Check for spelling errors
|
16 |
+
runs-on: ubuntu-latest
|
17 |
+
|
18 |
+
steps:
|
19 |
+
- name: Checkout
|
20 |
+
uses: actions/checkout@v4
|
21 |
+
- name: Codespell
|
22 |
+
uses: codespell-project/actions-codespell@v2
|
23 |
+
with:
|
24 |
+
exclude_file: docs/CODE_OF_CONDUCT.md
|
.github/workflows/dev-docker-image-build.yml
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Build and push a branch image to ghcr
|
2 |
+
|
3 |
+
on:
|
4 |
+
workflow_dispatch:
|
5 |
+
push:
|
6 |
+
branches:
|
7 |
+
- dev
|
8 |
+
|
9 |
+
jobs:
|
10 |
+
branch-build-and-push:
|
11 |
+
runs-on: [self-hosted, linux, x64]
|
12 |
+
steps:
|
13 |
+
- uses: actions/checkout@v4
|
14 |
+
with:
|
15 |
+
ref: ${{ github.ref.name }}
|
16 |
+
- name: Build the Docker image
|
17 |
+
run: |
|
18 |
+
buildx_containers=$(docker container ls -a -qf "name=buildx_buildkit" | tr '\n' ' ')
|
19 |
+
buildx_volumes=$(docker volume ls -qf "name=buildx_buildkit" | tr '\n' ' ')
|
20 |
+
|
21 |
+
if [ -n "$buildx_containers" ]; then
|
22 |
+
echo "Buildx containers to delete: $buildx_containers"
|
23 |
+
docker container rm -f $buildx_containers
|
24 |
+
fi
|
25 |
+
|
26 |
+
if [ -n "$buildx_volumes" ]; then
|
27 |
+
echo "Buildx volumes to delete: $buildx_volumes"
|
28 |
+
docker volume rm -f $buildx_volumes
|
29 |
+
fi
|
30 |
+
|
31 |
+
branch=${GITHUB_REF_NAME//\//-} # replace all / with -
|
32 |
+
echo "Building branch $branch"
|
33 |
+
|
34 |
+
# Create build container
|
35 |
+
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
36 |
+
docker buildx create --use
|
37 |
+
|
38 |
+
# Authenticate on registries
|
39 |
+
docker login https://ghcr.io -u qdrant --password ${{ secrets.GITHUB_TOKEN }}
|
40 |
+
|
41 |
+
# Build regular image for Github Registry
|
42 |
+
GITHUB_TAG="-t ghcr.io/qdrant/qdrant:$branch-${{ github.sha }} -t ghcr.io/qdrant/qdrant:$branch"
|
43 |
+
|
44 |
+
# Pull, retag and push to GitHub packages
|
45 |
+
docker buildx build --platform='linux/amd64,linux/arm64' --build-arg GIT_COMMIT_ID=${{ github.sha }} $GITHUB_TAG --push --label "org.opencontainers.image.revision"=${{ github.sha }} .
|
46 |
+
|
47 |
+
|
.github/workflows/dev-docker-image-prune.yml
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Delete old container images
|
2 |
+
|
3 |
+
on:
|
4 |
+
workflow_dispatch:
|
5 |
+
schedule:
|
6 |
+
- cron: "0 0 * * *" # every day at midnight
|
7 |
+
|
8 |
+
|
9 |
+
jobs:
|
10 |
+
dev-clean-ghcr:
|
11 |
+
name: Delete old unused dev container images
|
12 |
+
runs-on: ubuntu-latest
|
13 |
+
steps:
|
14 |
+
- name: Delete dev branch containers older than a month
|
15 |
+
uses: snok/container-retention-policy@v2
|
16 |
+
with:
|
17 |
+
image-names: qdrant
|
18 |
+
cut-off: A month ago UTC
|
19 |
+
account-type: org
|
20 |
+
org-name: qdrant
|
21 |
+
keep-at-least: 10
|
22 |
+
filter-tags: dev-*
|
23 |
+
token-type: github-token
|
24 |
+
token: ${{ secrets.GITHUB_TOKEN }}
|
25 |
+
dry-run: true
|
.github/workflows/docker-image.yml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Build and deploy docker image
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
# Pattern matched against refs/tags
|
6 |
+
tags:
|
7 |
+
- '*' # Push events to every tag not containing /
|
8 |
+
|
9 |
+
jobs:
|
10 |
+
|
11 |
+
build:
|
12 |
+
# Run build on our self-hosted runner, we had trouble with shared runners
|
13 |
+
runs-on: [self-hosted, linux, x64]
|
14 |
+
steps:
|
15 |
+
- uses: actions/checkout@v4
|
16 |
+
- uses: Swatinem/rust-cache@v2
|
17 |
+
- name: Get current tag
|
18 |
+
id: vars
|
19 |
+
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
|
20 |
+
- name: Build the Docker image
|
21 |
+
env:
|
22 |
+
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
|
23 |
+
run: |
|
24 |
+
# Create build container
|
25 |
+
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
26 |
+
docker buildx create --use
|
27 |
+
|
28 |
+
# Authenticate on registries
|
29 |
+
docker login --username generall --password ${{ secrets.DOCKERHUB_TOKEN }}
|
30 |
+
docker login https://docker.pkg.github.com -u qdrant --password ${{ secrets.GITHUB_TOKEN }}
|
31 |
+
|
32 |
+
# Build regular image for Docker Hub
|
33 |
+
DOCKERHUB_TAG="qdrant/qdrant:${{ github.ref_name }}"
|
34 |
+
DOCKERHUB_TAG_LATEST="qdrant/qdrant:latest"
|
35 |
+
TAGS="-t ${DOCKERHUB_TAG} -t ${DOCKERHUB_TAG_LATEST}"
|
36 |
+
GITHUB_TAG="docker.pkg.github.com/qdrant/qdrant/qdrant:${{ github.ref_name }}"
|
37 |
+
|
38 |
+
# Pull, retag and push to GitHub packages
|
39 |
+
docker buildx build --platform='linux/amd64,linux/arm64' --build-arg GIT_COMMIT_ID=${{ github.sha }} $TAGS --push --label "org.opencontainers.image.version"=$RELEASE_VERSION .
|
40 |
+
docker pull $DOCKERHUB_TAG
|
41 |
+
docker tag $DOCKERHUB_TAG $GITHUB_TAG
|
42 |
+
docker push $GITHUB_TAG
|
43 |
+
|
44 |
+
# Build unprivileged image for Docker Hub
|
45 |
+
DOCKERHUB_TAG_UNPRIVILEGED="qdrant/qdrant:${{ github.ref_name }}-unprivileged"
|
46 |
+
DOCKERHUB_TAG_LATEST_UNPRIVILEGED="qdrant/qdrant:latest-unprivileged"
|
47 |
+
TAGS_UNPRIVILEGED="-t ${DOCKERHUB_TAG_UNPRIVILEGED} -t ${DOCKERHUB_TAG_LATEST_UNPRIVILEGED}"
|
48 |
+
GITHUB_TAG_UNPRIVILEGED="docker.pkg.github.com/qdrant/qdrant/qdrant:${{ github.ref_name }}-unprivileged"
|
49 |
+
|
50 |
+
# Pull, retag and push to GitHub packages
|
51 |
+
docker buildx build --build-arg='USER_ID=1000' --platform='linux/amd64,linux/arm64' $TAGS_UNPRIVILEGED --push --label "org.opencontainers.image.version"=$RELEASE_VERSION .
|
52 |
+
docker pull $DOCKERHUB_TAG_UNPRIVILEGED
|
53 |
+
docker tag $DOCKERHUB_TAG_UNPRIVILEGED $GITHUB_TAG_UNPRIVILEGED
|
54 |
+
docker push $GITHUB_TAG_UNPRIVILEGED
|
.github/workflows/integration-tests.yml
ADDED
@@ -0,0 +1,333 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Integration tests
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
branches: [ master, dev ]
|
6 |
+
pull_request:
|
7 |
+
branches: [ '**' ]
|
8 |
+
|
9 |
+
env:
|
10 |
+
CARGO_TERM_COLOR: always
|
11 |
+
|
12 |
+
jobs:
|
13 |
+
test:
|
14 |
+
|
15 |
+
runs-on: ubuntu-latest
|
16 |
+
|
17 |
+
steps:
|
18 |
+
- name: Install minimal stable
|
19 |
+
uses: dtolnay/rust-toolchain@stable
|
20 |
+
- uses: actions/checkout@v4
|
21 |
+
- name: Install Protoc
|
22 |
+
uses: arduino/setup-protoc@v3
|
23 |
+
with:
|
24 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
25 |
+
- uses: Swatinem/rust-cache@v2
|
26 |
+
- uses: actions/setup-python@v5
|
27 |
+
with:
|
28 |
+
python-version: '3.11'
|
29 |
+
- name: Install dependencies
|
30 |
+
run: |
|
31 |
+
sudo apt-get install clang
|
32 |
+
curl -sSL https://install.python-poetry.org | python3 -
|
33 |
+
|
34 |
+
poetry -C tests check --lock
|
35 |
+
poetry -C tests install --no-root
|
36 |
+
- name: Build
|
37 |
+
run: cargo build --features "service_debug data-consistency-check"
|
38 |
+
- name: Run integration tests
|
39 |
+
run: poetry -C tests run ./tests/integration-tests.sh
|
40 |
+
shell: bash
|
41 |
+
|
42 |
+
test-consensus:
|
43 |
+
|
44 |
+
runs-on: ubuntu-latest
|
45 |
+
|
46 |
+
steps:
|
47 |
+
- name: Install minimal stable
|
48 |
+
uses: dtolnay/rust-toolchain@stable
|
49 |
+
- uses: actions/checkout@v4
|
50 |
+
- name: Install Protoc
|
51 |
+
uses: arduino/setup-protoc@v3
|
52 |
+
with:
|
53 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
54 |
+
- uses: Swatinem/rust-cache@v2
|
55 |
+
- name: Install dependencies
|
56 |
+
run: sudo apt-get install clang
|
57 |
+
- uses: actions/setup-python@v5
|
58 |
+
with:
|
59 |
+
python-version: '3.11'
|
60 |
+
- name: Install dependencies
|
61 |
+
run: |
|
62 |
+
curl -sSL https://install.python-poetry.org | python3 -
|
63 |
+
|
64 |
+
poetry -C tests check --lock
|
65 |
+
poetry -C tests install --no-root
|
66 |
+
- name: Build
|
67 |
+
run: cargo build --features "service_debug data-consistency-check"
|
68 |
+
- name: Run integration tests - 1 peer
|
69 |
+
run: poetry -C tests run ./tests/integration-tests.sh distributed
|
70 |
+
shell: bash
|
71 |
+
- name: Run integration tests - multiple peers - pytest
|
72 |
+
run: poetry -C tests run pytest tests/consensus_tests
|
73 |
+
timeout-minutes: 60
|
74 |
+
- name: upload logs in case of failure
|
75 |
+
uses: actions/upload-artifact@v4
|
76 |
+
if: failure() || cancelled()
|
77 |
+
with:
|
78 |
+
name: consensus-test-logs
|
79 |
+
retention-days: 90 # default max value
|
80 |
+
path: consensus_test_logs
|
81 |
+
|
82 |
+
test-consensus-compose:
|
83 |
+
|
84 |
+
runs-on: ubuntu-latest
|
85 |
+
|
86 |
+
steps:
|
87 |
+
- uses: actions/checkout@v4
|
88 |
+
- uses: actions/setup-python@v5
|
89 |
+
with:
|
90 |
+
python-version: '3.11'
|
91 |
+
- name: Install dependencies
|
92 |
+
run: |
|
93 |
+
curl -sSL https://install.python-poetry.org | python3 -
|
94 |
+
|
95 |
+
poetry -C tests check --lock
|
96 |
+
poetry -C tests install --no-root
|
97 |
+
- name: Set up Docker Buildx
|
98 |
+
uses: docker/setup-buildx-action@v3
|
99 |
+
- name: Docker build
|
100 |
+
uses: docker/build-push-action@v6
|
101 |
+
with:
|
102 |
+
context: .
|
103 |
+
tags: qdrant_consensus
|
104 |
+
cache-from: |
|
105 |
+
type=gha,scope=${{ github.ref }}
|
106 |
+
type=gha,scope=${{ github.base_ref }}
|
107 |
+
cache-to: type=gha,mode=max,scope=${{ github.ref }}
|
108 |
+
load: true
|
109 |
+
build-args: |
|
110 |
+
PROFILE=ci
|
111 |
+
- name: Run integration tests - multiple peers - compose
|
112 |
+
run: poetry run ./test_restart.sh
|
113 |
+
working-directory: ./tests/consensus_tests
|
114 |
+
|
115 |
+
test-tls-compose:
|
116 |
+
|
117 |
+
name: "Basic TLS/HTTPS tests"
|
118 |
+
|
119 |
+
runs-on: ubuntu-latest
|
120 |
+
|
121 |
+
steps:
|
122 |
+
- uses: actions/checkout@v4
|
123 |
+
- name: Set up Docker Buildx
|
124 |
+
uses: docker/setup-buildx-action@v3
|
125 |
+
- name: Docker build
|
126 |
+
uses: docker/build-push-action@v6
|
127 |
+
with:
|
128 |
+
context: .
|
129 |
+
tags: qdrant_tls
|
130 |
+
cache-from: |
|
131 |
+
type=gha,scope=${{ github.ref }}
|
132 |
+
type=gha,scope=${{ github.base_ref }}
|
133 |
+
cache-to: type=gha,mode=max,scope=${{ github.ref }}
|
134 |
+
load: true
|
135 |
+
build-args: |
|
136 |
+
PROFILE=ci
|
137 |
+
- name: Run basic TLS/HTTPS test
|
138 |
+
run: ./test_tls.sh
|
139 |
+
working-directory: ./tests/tls
|
140 |
+
- name: Run snapshot shard transfer TLS/HTTPS test
|
141 |
+
run: ./test_tls_snapshot_shard_transfer.sh
|
142 |
+
working-directory: ./tests/tls
|
143 |
+
|
144 |
+
|
145 |
+
test-consistency:
|
146 |
+
|
147 |
+
runs-on: ubuntu-latest
|
148 |
+
|
149 |
+
steps:
|
150 |
+
- name: Install minimal stable
|
151 |
+
uses: dtolnay/rust-toolchain@stable
|
152 |
+
- uses: actions/checkout@v4
|
153 |
+
- uses: Swatinem/rust-cache@v2
|
154 |
+
- name: Set up Docker Buildx
|
155 |
+
uses: docker/setup-buildx-action@v3
|
156 |
+
- name: Install dependencies
|
157 |
+
run: sudo apt-get install -y jq
|
158 |
+
- name: Docker build
|
159 |
+
uses: docker/build-push-action@v6
|
160 |
+
with:
|
161 |
+
context: tools/schema2openapi
|
162 |
+
tags: schema2openapi
|
163 |
+
cache-from: |
|
164 |
+
type=gha,scope=${{ github.ref }}-schema2openapi
|
165 |
+
type=gha,scope=${{ github.base_ref }}-schema2openapi
|
166 |
+
cache-to: type=gha,mode=max,scope=${{ github.ref }}-schema2openapi
|
167 |
+
load: true
|
168 |
+
build-args: |
|
169 |
+
PROFILE=ci
|
170 |
+
- name: Install Protoc
|
171 |
+
uses: arduino/setup-protoc@v3
|
172 |
+
with:
|
173 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
174 |
+
- name: gRPC file consistency check
|
175 |
+
run: ./tests/grpc_consistency_check.sh
|
176 |
+
- name: OpenAPI file consistency check
|
177 |
+
run: ./tests/openapi_consistency_check.sh
|
178 |
+
|
179 |
+
|
180 |
+
test-low-resources:
|
181 |
+
runs-on: ubuntu-latest
|
182 |
+
|
183 |
+
steps:
|
184 |
+
- name: Install dependencies
|
185 |
+
run: sudo apt-get install clang git-lfs jq
|
186 |
+
- name: Setup git-lfs
|
187 |
+
run: git lfs install
|
188 |
+
- name: Install minimal stable
|
189 |
+
uses: dtolnay/rust-toolchain@stable
|
190 |
+
- uses: Swatinem/rust-cache@v2
|
191 |
+
- uses: actions/checkout@v4
|
192 |
+
- name: Install Protoc
|
193 |
+
uses: arduino/setup-protoc@v3
|
194 |
+
with:
|
195 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
196 |
+
- name: Set up Docker Buildx
|
197 |
+
uses: docker/setup-buildx-action@v3
|
198 |
+
- name: Docker build
|
199 |
+
uses: docker/build-push-action@v6
|
200 |
+
with:
|
201 |
+
context: .
|
202 |
+
tags: qdrant-recovery
|
203 |
+
cache-from: |
|
204 |
+
type=gha,scope=${{ github.ref }}
|
205 |
+
type=gha,scope=${{ github.base_ref }}
|
206 |
+
cache-to: type=gha,mode=max,scope=${{ github.ref }}
|
207 |
+
load: true
|
208 |
+
build-args: |
|
209 |
+
PROFILE=ci
|
210 |
+
- name: Run low RAM test
|
211 |
+
working-directory: ./tests/low-ram
|
212 |
+
shell: bash
|
213 |
+
run: ./low-ram.sh
|
214 |
+
- name: Run low Disk test - search
|
215 |
+
working-directory: ./tests/low-disk
|
216 |
+
shell: bash
|
217 |
+
run: ./low-disk.sh
|
218 |
+
- name: Run low Disk test - indexing
|
219 |
+
working-directory: ./tests/low-disk
|
220 |
+
shell: bash
|
221 |
+
run: ./low-disk.sh indexing
|
222 |
+
|
223 |
+
test-snapshot-operations-s3-minio:
|
224 |
+
runs-on: ubuntu-latest
|
225 |
+
|
226 |
+
# Setup minio server
|
227 |
+
services:
|
228 |
+
minio:
|
229 |
+
image: satantime/minio-server
|
230 |
+
ports:
|
231 |
+
- 9000:9000
|
232 |
+
env:
|
233 |
+
MINIO_ACCESS_KEY: "minioadmin"
|
234 |
+
MINIO_SECRET_KEY: "minioadmin"
|
235 |
+
|
236 |
+
steps:
|
237 |
+
- name: Setup test bucket
|
238 |
+
env:
|
239 |
+
AWS_ACCESS_KEY_ID: "minioadmin"
|
240 |
+
AWS_SECRET_ACCESS_KEY: "minioadmin"
|
241 |
+
AWS_EC2_METADATA_DISABLED: "true"
|
242 |
+
run: echo $(aws --endpoint-url http://127.0.0.1:9000/ s3 mb s3://test-bucket)
|
243 |
+
|
244 |
+
- name: Install dependencies
|
245 |
+
run: sudo apt-get install clang jq
|
246 |
+
- name: Setup git-lfs
|
247 |
+
run: git lfs install
|
248 |
+
- name: Install minimal stable
|
249 |
+
uses: dtolnay/rust-toolchain@stable
|
250 |
+
- uses: Swatinem/rust-cache@v2
|
251 |
+
- uses: actions/checkout@v4
|
252 |
+
- name: Install Protoc
|
253 |
+
uses: arduino/setup-protoc@v3
|
254 |
+
with:
|
255 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
256 |
+
- name: Set up Docker Buildx
|
257 |
+
uses: docker/setup-buildx-action@v3
|
258 |
+
- name: Docker build
|
259 |
+
uses: docker/build-push-action@v6
|
260 |
+
with:
|
261 |
+
context: .
|
262 |
+
tags: qdrant-snapshots
|
263 |
+
cache-from: |
|
264 |
+
type=gha,scope=${{ github.ref }}
|
265 |
+
type=gha,scope=${{ github.base_ref }}
|
266 |
+
cache-to: type=gha,mode=max,scope=${{ github.ref }}
|
267 |
+
load: true
|
268 |
+
build-args: |
|
269 |
+
PROFILE=ci
|
270 |
+
- name: Install dependencies
|
271 |
+
run: sudo snap install yq
|
272 |
+
- name: Run test snapshot operations on different storage filesystems
|
273 |
+
working-directory: ./tests/snapshots
|
274 |
+
shell: bash
|
275 |
+
run: ./snapshots-recovery.sh local
|
276 |
+
- name: Run test snapshot operations on different storage filesystems
|
277 |
+
working-directory: ./tests/snapshots
|
278 |
+
shell: bash
|
279 |
+
run: ./snapshots-recovery.sh s3
|
280 |
+
|
281 |
+
test-shard-snapshot-api-s3-minio:
|
282 |
+
runs-on: ubuntu-latest
|
283 |
+
# Setup minio server
|
284 |
+
services:
|
285 |
+
minio:
|
286 |
+
image: satantime/minio-server
|
287 |
+
ports:
|
288 |
+
- 9000:9000
|
289 |
+
env:
|
290 |
+
MINIO_ACCESS_KEY: "minioadmin"
|
291 |
+
MINIO_SECRET_KEY: "minioadmin"
|
292 |
+
steps:
|
293 |
+
- name: Setup test bucket
|
294 |
+
env:
|
295 |
+
AWS_ACCESS_KEY_ID: "minioadmin"
|
296 |
+
AWS_SECRET_ACCESS_KEY: "minioadmin"
|
297 |
+
AWS_EC2_METADATA_DISABLED: "true"
|
298 |
+
run: echo $(aws --endpoint-url http://127.0.0.1:9000/ s3 mb s3://test-bucket)
|
299 |
+
- name: Install minimal stable
|
300 |
+
uses: dtolnay/rust-toolchain@stable
|
301 |
+
- uses: Swatinem/rust-cache@v2
|
302 |
+
- uses: actions/checkout@v4
|
303 |
+
- name: Install Protoc
|
304 |
+
uses: arduino/setup-protoc@v3
|
305 |
+
with:
|
306 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
307 |
+
- name: Install dependencies
|
308 |
+
run: sudo apt-get install clang jq
|
309 |
+
- name: Build
|
310 |
+
run: cargo build --bin qdrant
|
311 |
+
- name: Run Shard Snapshot API Tests (local)
|
312 |
+
shell: bash
|
313 |
+
run: |
|
314 |
+
cargo run &
|
315 |
+
trap 'kill $(jobs -p) &>/dev/null || :' EXIT
|
316 |
+
sleep 10
|
317 |
+
|
318 |
+
./tests/shard-snapshot-api.sh test-all
|
319 |
+
- name: Run Shard Snapshot API Tests (s3)
|
320 |
+
shell: bash
|
321 |
+
run: |
|
322 |
+
export QDRANT__STORAGE__SNAPSHOTS_CONFIG__SNAPSHOTS_STORAGE=s3
|
323 |
+
export QDRANT__STORAGE__SNAPSHOTS_CONFIG__S3_CONFIG__BUCKET=test-bucket
|
324 |
+
export QDRANT__STORAGE__SNAPSHOTS_CONFIG__S3_CONFIG__REGION=us-east-1
|
325 |
+
export QDRANT__STORAGE__SNAPSHOTS_CONFIG__S3_CONFIG__ACCESS_KEY=minioadmin
|
326 |
+
export QDRANT__STORAGE__SNAPSHOTS_CONFIG__S3_CONFIG__SECRET_KEY=minioadmin
|
327 |
+
export QDRANT__STORAGE__SNAPSHOTS_CONFIG__S3_CONFIG__ENDPOINT_URL=http://127.0.0.1:9000
|
328 |
+
|
329 |
+
cargo run &
|
330 |
+
trap 'kill $(jobs -p) &>/dev/null || :' EXIT
|
331 |
+
sleep 10
|
332 |
+
|
333 |
+
./tests/shard-snapshot-api.sh test-all
|
.github/workflows/release-artifacts.yml
ADDED
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Build and publish release packages
|
2 |
+
permissions:
|
3 |
+
contents: write
|
4 |
+
on:
|
5 |
+
release:
|
6 |
+
# 'published' is triggered when publishing draft release, 'created' is not
|
7 |
+
types: [published]
|
8 |
+
|
9 |
+
jobs:
|
10 |
+
build-linux-binaries:
|
11 |
+
strategy:
|
12 |
+
matrix:
|
13 |
+
include:
|
14 |
+
- target: x86_64-unknown-linux-gnu
|
15 |
+
os: ubuntu-latest
|
16 |
+
|
17 |
+
- target: x86_64-unknown-linux-musl
|
18 |
+
os: ubuntu-latest
|
19 |
+
|
20 |
+
- target: aarch64-unknown-linux-musl
|
21 |
+
os: ubuntu-latest
|
22 |
+
runs-on: ${{ matrix.os }}
|
23 |
+
steps:
|
24 |
+
- name: Install dependencies
|
25 |
+
run: |
|
26 |
+
sudo apt-get update
|
27 |
+
sudo apt-get install -y gcc-multilib clang cmake protobuf-compiler
|
28 |
+
rustup default stable
|
29 |
+
rustup update
|
30 |
+
rustup show
|
31 |
+
cargo -Vv
|
32 |
+
- uses: actions/checkout@v4
|
33 |
+
- name: Install Protoc
|
34 |
+
uses: arduino/setup-protoc@v3
|
35 |
+
with:
|
36 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
37 |
+
- name: Install Rust toolchain
|
38 |
+
uses: dtolnay/rust-toolchain@stable
|
39 |
+
- name: Install cross-compilation tools
|
40 |
+
with:
|
41 |
+
target: ${{ matrix.target }}
|
42 |
+
if: startsWith(matrix.os, 'ubuntu') && contains(matrix.target, '-musl')
|
43 |
+
uses: taiki-e/setup-cross-toolchain-action@v1
|
44 |
+
- name: Build and publish
|
45 |
+
uses: taiki-e/upload-rust-binary-action@v1
|
46 |
+
with:
|
47 |
+
bin: qdrant
|
48 |
+
target: ${{ matrix.target }}
|
49 |
+
token: ${{ secrets.GITHUB_TOKEN }}
|
50 |
+
- name: Build Debian Package
|
51 |
+
if: matrix.target == 'x86_64-unknown-linux-musl'
|
52 |
+
run: |
|
53 |
+
cargo install cargo-deb
|
54 |
+
cargo deb --no-strip --target ${{ matrix.target }}
|
55 |
+
- name: Upload Debian package
|
56 |
+
if: matrix.target == 'x86_64-unknown-linux-musl'
|
57 |
+
uses: svenstaro/upload-release-action@v2
|
58 |
+
with:
|
59 |
+
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
60 |
+
file: target/${{ matrix.target }}/debian/*.deb
|
61 |
+
tag: ${{ github.ref }}
|
62 |
+
overwrite: true
|
63 |
+
file_glob: true
|
64 |
+
|
65 |
+
build-mac-binaries:
|
66 |
+
strategy:
|
67 |
+
matrix:
|
68 |
+
include:
|
69 |
+
- target: x86_64-apple-darwin
|
70 |
+
os: macos-latest
|
71 |
+
- target: aarch64-apple-darwin
|
72 |
+
os: macos-latest
|
73 |
+
runs-on: ${{ matrix.os }}
|
74 |
+
steps:
|
75 |
+
- name: Install dependencies
|
76 |
+
run: |
|
77 |
+
brew update-reset
|
78 |
+
brew install gcc cmake protobuf-c
|
79 |
+
rustup default stable
|
80 |
+
rustup update
|
81 |
+
rustup show
|
82 |
+
cargo -Vv
|
83 |
+
- uses: actions/checkout@v4
|
84 |
+
- name: Build and publish
|
85 |
+
uses: taiki-e/upload-rust-binary-action@v1
|
86 |
+
with:
|
87 |
+
bin: qdrant
|
88 |
+
target: ${{ matrix.target }}
|
89 |
+
token: ${{ secrets.GITHUB_TOKEN }}
|
90 |
+
|
91 |
+
build-windows-binaries:
|
92 |
+
strategy:
|
93 |
+
matrix:
|
94 |
+
include:
|
95 |
+
- os: windows-latest
|
96 |
+
runs-on: ${{ matrix.os }}
|
97 |
+
steps:
|
98 |
+
- name: Install minimal stable
|
99 |
+
uses: dtolnay/rust-toolchain@stable
|
100 |
+
- uses: actions/checkout@v4
|
101 |
+
- uses: Swatinem/rust-cache@v2
|
102 |
+
- name: Install Protoc
|
103 |
+
uses: arduino/setup-protoc@v3
|
104 |
+
with:
|
105 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
106 |
+
|
107 |
+
- name: Build
|
108 |
+
run: cargo build --release --locked
|
109 |
+
|
110 |
+
- name: Build and publish
|
111 |
+
uses: taiki-e/upload-rust-binary-action@v1
|
112 |
+
with:
|
113 |
+
bin: qdrant
|
114 |
+
token: ${{ secrets.GITHUB_TOKEN }}
|
115 |
+
|
116 |
+
build-app-image:
|
117 |
+
strategy:
|
118 |
+
matrix:
|
119 |
+
include:
|
120 |
+
- os: ubuntu-20.04
|
121 |
+
runs-on: ${{ matrix.os }}
|
122 |
+
steps:
|
123 |
+
- uses: actions/checkout@v4
|
124 |
+
|
125 |
+
- name: Install dependencies
|
126 |
+
run: |
|
127 |
+
sudo apt-get update
|
128 |
+
sudo apt-get install -y gcc-multilib clang cmake protobuf-compiler libfuse2
|
129 |
+
|
130 |
+
- name: Install Protoc
|
131 |
+
uses: arduino/setup-protoc@v3
|
132 |
+
with:
|
133 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
134 |
+
|
135 |
+
- name: Install Rust toolchain
|
136 |
+
uses: dtolnay/rust-toolchain@stable
|
137 |
+
|
138 |
+
- name: Build release binary
|
139 |
+
run: cargo build --release
|
140 |
+
|
141 |
+
- name: Build AppImage
|
142 |
+
shell: bash
|
143 |
+
run: |
|
144 |
+
mkdir -p AppDir
|
145 |
+
cp docs/logo.svg qdrant.svg
|
146 |
+
cp target/release/qdrant .
|
147 |
+
|
148 |
+
curl -Lo linuxdeploy-x86_64.AppImage \
|
149 |
+
https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
150 |
+
chmod +x linuxdeploy-x86_64.AppImage
|
151 |
+
|
152 |
+
./linuxdeploy-x86_64.AppImage \
|
153 |
+
--appdir AppDir \
|
154 |
+
--executable qdrant \
|
155 |
+
-d pkg/appimage/qdrant.desktop \
|
156 |
+
-i qdrant.svg \
|
157 |
+
--custom-apprun pkg/appimage/AppRun.sh
|
158 |
+
|
159 |
+
wget -O dist-qdrant.zip "$(curl --silent "https://api.github.com/repos/qdrant/qdrant-web-ui/releases/latest" | jq -r '.assets[] | select(.name=="dist-qdrant.zip") | .browser_download_url')"
|
160 |
+
unzip -o dist-qdrant.zip -d static
|
161 |
+
mv -n static/dist/* static/
|
162 |
+
rm -rf static/dist
|
163 |
+
mv static AppDir/usr/share
|
164 |
+
|
165 |
+
./linuxdeploy-x86_64.AppImage \
|
166 |
+
--appdir AppDir \
|
167 |
+
--output appimage
|
168 |
+
|
169 |
+
- name: Upload AppImage
|
170 |
+
uses: svenstaro/upload-release-action@v2
|
171 |
+
with:
|
172 |
+
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
173 |
+
file: "qdrant-x86_64.AppImage"
|
174 |
+
tag: ${{ github.ref }}
|
175 |
+
overwrite: true
|
176 |
+
file_glob: true
|
.github/workflows/rust-lint.yml
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Formatter and linter
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
branches: [ master, dev ]
|
6 |
+
pull_request:
|
7 |
+
branches: [ '**' ]
|
8 |
+
|
9 |
+
env:
|
10 |
+
CARGO_TERM_COLOR: always
|
11 |
+
|
12 |
+
jobs:
|
13 |
+
test:
|
14 |
+
|
15 |
+
runs-on: ubuntu-latest
|
16 |
+
|
17 |
+
steps:
|
18 |
+
- name: Install minimal nightly (only for fmt)
|
19 |
+
uses: dtolnay/rust-toolchain@nightly
|
20 |
+
with:
|
21 |
+
components: rustfmt
|
22 |
+
- name: Install minimal stable
|
23 |
+
uses: dtolnay/rust-toolchain@stable
|
24 |
+
with:
|
25 |
+
components: rustfmt, clippy
|
26 |
+
- uses: actions/checkout@v4
|
27 |
+
- name: Install Protoc
|
28 |
+
uses: arduino/setup-protoc@v3
|
29 |
+
with:
|
30 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
31 |
+
- uses: Swatinem/rust-cache@v2
|
32 |
+
with:
|
33 |
+
key: clippy
|
34 |
+
- name: Install dependencies
|
35 |
+
run: sudo apt-get install clang libunwind-dev
|
36 |
+
- name: Check code formatting
|
37 |
+
run: cargo +nightly fmt --all -- --check
|
38 |
+
- name: Check cargo clippy warnings
|
39 |
+
run: cargo clippy --workspace -- -D warnings
|
40 |
+
- name: Check cargo clippy warnings for all targets
|
41 |
+
run: cargo clippy --workspace --all-targets -- -D warnings
|
42 |
+
- name: Check cargo clippy warnings for all targets and features
|
43 |
+
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|
.github/workflows/rust.yml
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Rust tests
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
branches: [ master, dev ]
|
6 |
+
pull_request:
|
7 |
+
branches: [ '**' ]
|
8 |
+
|
9 |
+
env:
|
10 |
+
CARGO_TERM_COLOR: always
|
11 |
+
|
12 |
+
jobs:
|
13 |
+
test:
|
14 |
+
runs-on: ${{ matrix.os }}
|
15 |
+
strategy:
|
16 |
+
matrix:
|
17 |
+
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
18 |
+
|
19 |
+
steps:
|
20 |
+
- name: Install minimal stable
|
21 |
+
uses: dtolnay/rust-toolchain@stable
|
22 |
+
- uses: actions/checkout@v4
|
23 |
+
- uses: Swatinem/rust-cache@v2
|
24 |
+
- name: Install Protoc
|
25 |
+
uses: arduino/setup-protoc@v3
|
26 |
+
with:
|
27 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
28 |
+
- name: Install nextest
|
29 |
+
uses: taiki-e/install-action@nextest
|
30 |
+
- name: Build
|
31 |
+
run: cargo build --tests --workspace
|
32 |
+
- name: Run tests
|
33 |
+
# Profile "ci" is configured in .config/nextest.toml
|
34 |
+
run: cargo nextest run --workspace --profile ci
|
35 |
+
- name: Upload test report
|
36 |
+
uses: actions/upload-artifact@v4
|
37 |
+
with:
|
38 |
+
name: junit-${{ matrix.os }}.xml
|
39 |
+
path: target/nextest/ci/junit.xml
|
40 |
+
|
41 |
+
# After tests are run, this hacky script will process the JUnit output of nextest
|
42 |
+
# and will create a GH Issue if there is a test marked as flaky,
|
43 |
+
# Failure of updating an issue is ignored because it fails for external contributors.
|
44 |
+
process-results:
|
45 |
+
runs-on: ubuntu-latest
|
46 |
+
needs: test
|
47 |
+
permissions:
|
48 |
+
contents: read
|
49 |
+
issues: write
|
50 |
+
strategy:
|
51 |
+
matrix:
|
52 |
+
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
53 |
+
steps:
|
54 |
+
- name: Download test report
|
55 |
+
uses: actions/download-artifact@v4
|
56 |
+
with:
|
57 |
+
name: junit-${{ matrix.os }}.xml
|
58 |
+
- name: Process test report
|
59 |
+
id: process-test-report
|
60 |
+
run: |
|
61 |
+
pip install yq
|
62 |
+
xq '.. | select(type == "object") | select(has("flakyFailure"))' junit.xml > flaky_tests.json
|
63 |
+
echo has_flaky_tests=$(jq '. | has("flakyFailure")' flaky_tests.json) >> $GITHUB_OUTPUT
|
64 |
+
- name: Get flaky test details
|
65 |
+
id: get-flaky-tests
|
66 |
+
if: ${{ steps.process-test-report.outputs.has_flaky_tests == 'true' }}
|
67 |
+
run: |
|
68 |
+
echo "Flaky tests found"
|
69 |
+
echo test=$(jq '.["@name"]' flaky_tests.json -r ) >> $GITHUB_OUTPUT
|
70 |
+
delimiter="###r###"
|
71 |
+
echo "content<<$delimiter" >> $GITHUB_OUTPUT
|
72 |
+
echo "$(jq '[.flakyFailure] | flatten | .[0]["system-err"]' flaky_tests.json -r)" >> $GITHUB_OUTPUT
|
73 |
+
echo $delimiter >> $GITHUB_OUTPUT
|
74 |
+
- name: pull issue template
|
75 |
+
if: ${{ steps.process-test-report.outputs.has_flaky_tests == 'true' }}
|
76 |
+
uses: actions/checkout@v4
|
77 |
+
with:
|
78 |
+
sparse-checkout: |
|
79 |
+
.github/ISSUE_TEMPLATE/flaky_test.md
|
80 |
+
sparse-checkout-cone-mode: false
|
81 |
+
- name: Create issue for flaky tests
|
82 |
+
continue-on-error: true
|
83 |
+
id: create-issue
|
84 |
+
if: ${{ steps.process-test-report.outputs.has_flaky_tests == 'true' }}
|
85 |
+
uses: JasonEtco/create-an-issue@v2
|
86 |
+
env:
|
87 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
88 |
+
TEST_NAME: ${{ steps.get-flaky-tests.outputs.test }}
|
89 |
+
SYSTEM_ERROR: ${{ steps.get-flaky-tests.outputs.content }}
|
90 |
+
REPOSITORY: ${{ github.repository }}
|
91 |
+
RUN_ID: ${{ github.run_id }}
|
92 |
+
JOB_ID: ${{ github.job }}
|
93 |
+
SHA: ${{ github.sha }}
|
94 |
+
WORKFLOW: ${{ github.workflow }}
|
95 |
+
JOB: ${{ github.job }}
|
96 |
+
BRANCH: ${{ github.ref }}
|
97 |
+
OS: ${{ matrix.os }}
|
98 |
+
PR: "#${{ github.event.pull_request.number }}"
|
99 |
+
with:
|
100 |
+
filename: .github/ISSUE_TEMPLATE/flaky_test.md
|
101 |
+
update_existing: true
|
.github/workflows/storage-compat.yml
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Storage compatibility tests
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
branches: [ master, dev ]
|
6 |
+
pull_request:
|
7 |
+
branches: [ '**' ]
|
8 |
+
|
9 |
+
env:
|
10 |
+
CARGO_TERM_COLOR: always
|
11 |
+
|
12 |
+
jobs:
|
13 |
+
test:
|
14 |
+
|
15 |
+
runs-on: ubuntu-latest
|
16 |
+
|
17 |
+
steps:
|
18 |
+
- name: Install dependencies
|
19 |
+
run: sudo apt-get install clang git-lfs
|
20 |
+
- name: Setup git-lfs
|
21 |
+
run: git lfs install
|
22 |
+
- name: Install minimal stable
|
23 |
+
uses: dtolnay/rust-toolchain@stable
|
24 |
+
- uses: actions/checkout@v4
|
25 |
+
- name: Install Protoc
|
26 |
+
uses: arduino/setup-protoc@v3
|
27 |
+
with:
|
28 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
29 |
+
- uses: Swatinem/rust-cache@v2
|
30 |
+
- name: Run storage compatibility test
|
31 |
+
run: ./tests/storage-compat/storage-compatibility.sh
|
32 |
+
shell: bash
|