Repository navigation
88 lines (70 loc) · 2.41 KB
/
Copy pathserver-test.yml
File metadata and controls
88 lines (70 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Server Unit Tests
on:
pull_request:
branches: [main]
paths:
- "server/**"
- ".github/workflows/server**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
clippy-test:
runs-on: nixos
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Dummy Qdrant binary
run: touch apps/desktop/src-tauri/bin/qdrant-x86_64-unknown-linux-gnu
# - name: Restore cache
# run: cp -r /sccache/target target || echo "failed to restore target cache"
- name: Rustfmt
run: nix develop -c bash -c 'cargo --locked fmt -p bleep -- --check'
- name: Clippy
run: nix develop -c bash -c 'cargo --locked clippy -p bleep --all-features'
- name: Tests
run: nix develop -c bash -c 'cargo --locked test -p bleep --all-features --release'
- name: Sccache stats
run: nix develop -c bash -c 'sccache --show-stats'
# - name: Store cache
# run: cp -r target /sccache || echo "storing cache failed"
# benchmark:
# runs-on: [self-hosted, benchmark]
# steps:
# - uses: actions/checkout@v3
# with:
# clean: false
# lfs: true
# - name: Setup Rust toolchain
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: stable
# override: true
# # Assume that self-hosted box already has universal ctags installed
# # Can use nix when https://github.com/cachix/install-nix-action/issues/98
# # has been resolved
# # - uses: cachix/install-nix-action@v18
# # - name: Install Universal Ctags
# # run: 'nix profile install nixpkgs#universal-ctags'
# - name: Check ctags version
# run: "which ctags; ctags --version"
# - uses: boa-dev/criterion-compare-action@v3.2.4
# env:
# BLOOP_LOG: bleep=debug
# with:
# cwd: ./server
# benchName: "indexes"
# branchName: ${{ github.base_ref }}
# token: ${{ secrets.GITHUB_TOKEN }}
# - uses: boa-dev/criterion-compare-action@v3.2.4
# env:
# BLOOP_LOG: bleep=debug
# with:
# cwd: ./server
# benchName: "queries"
# branchName: ${{ github.base_ref }}
# token: ${{ secrets.GITHUB_TOKEN }}