-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (90 loc) · 2.39 KB
/
main.yml
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
89
90
91
92
93
94
95
96
97
98
99
100
name: Release branch jobs
permissions:
pull-requests: write
contents: write
on:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
# Ensure formatting
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Rustfmt
run: cargo fmt --all --check
# Make sure the release's build works
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build
# Generate code coverage using llvm cov
coverage:
needs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Populate test graph
run: pip install falkordb && ./resources/populate_graph.py
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- name: Generate Code Coverage
run: cargo llvm-cov nextest --all --codecov --output-path codecov.json
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # Must be manually set
files: codecov.json
fail_ci_if_error: true
services:
falkordb:
image: falkordb/falkordb:edge
ports:
- 6379:6379
# Ensure no clippy warnings
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Clippy
run: cargo clippy --all
# Make sure the release's docs are full
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Doc
run: cargo doc --all
# Make sure no unwanted licenses or yanked crates have slipped in
deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
# Actually publish to crates.io
crates-io:
needs:
- fmt
- build
- coverage
- clippy
- doc
- deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Release-plz needs all the history
- name: Run release-plz
uses: MarcoIeni/[email protected]
with:
command: release-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Automatically generated by Github Actions
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} # Must be manually set