-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (38 loc) · 1.04 KB
/
build.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
name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-20.04
services:
mysql:
image: mysql:8.0.30-debian
ports:
- 13306:3306
env:
MYSQL_ROOT_PASSWORD: password
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- name: Install libaio
run: sudo apt-get install -y libaio1 libaio-dev
- name: Checkout repository
uses: actions/checkout@v2
- name: Build
run: cargo build --verbose --all
- name: Run tests
run: cargo test --verbose --all
- name: Install cargo-tarpaulin
uses: actions-rs/[email protected]
with:
crate: cargo-tarpaulin
version: latest
use-tool-cache: true
- name: Run cargo-tarpaulin
run: cargo tarpaulin --all-features --workspace --timeout 120 --out Xml
- name: Upload to codecov.io
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}