Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 6d6db79

Browse files
committed
feat: update ci
1 parent f3f947b commit 6d6db79

File tree

2 files changed

+37
-18
lines changed

2 files changed

+37
-18
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@ env:
1515
jobs:
1616
build:
1717
runs-on: ubuntu-latest
18-
container:
19-
image: xd009642/tarpaulin:develop-nightly
20-
options: --security-opt seccomp=unconfined
21-
2218
steps:
2319
- name: 📁 Checkout
2420
uses: actions/checkout@v3
21+
with:
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}
2523

2624
- name: ⚡ Cache
2725
uses: actions/cache@v3
@@ -34,36 +32,44 @@ jobs:
3432
~/.cargo/registry/index/
3533
~/.cargo/registry/cache/
3634
~/.cargo/git/db/
37-
.cargo/
38-
target/
35+
target/
3936
4037
- name: 🔧 Install protoc
41-
uses: arduino/setup-protoc@v1
38+
uses: arduino/[email protected]
39+
with:
40+
repo-token: ${{ secrets.GITHUB_TOKEN }}
4241

4342
- name: 🔨 Install tools
4443
run: |
45-
apt update && apt install sudo
46-
sudo apt install libssl-dev build-essential cmake pkg-config llvm-dev libclang-dev clang mosquitto-dev libmosquitto-dev libsqlite3-dev -y
47-
44+
sudo apt update \
45+
&& sudo apt install libssl-dev build-essential cmake pkg-config llvm-dev libclang-dev clang libmosquitto-dev libsqlite3-dev -y \
46+
&& cargo install --locked cargo-audit || true \
47+
&& cargo install cargo-tarpaulin
48+
49+
- name: 🔐 Run audit
50+
run: |
51+
cargo audit
52+
4853
- name: 🔎 Run tests
4954
run: |
50-
cargo +nightly tarpaulin --workspace --timeout 120 --out xml
55+
cargo tarpaulin --workspace --timeout 120 --skip-clean --out xml
5156
5257
- name: ☁ Codecov
5358
uses: codecov/codecov-action@v3
5459
with:
5560
token: ${{secrets.CODECOV_TOKEN}}
61+
verbose: true
5662

5763
tag:
5864
needs: [build]
5965
runs-on: ubuntu-latest
6066
steps:
61-
- name: Checkout
67+
- name: 📁 Checkout
6268
uses: actions/checkout@v2
6369
with:
6470
fetch-depth: '0'
6571

66-
- name: Pre release
72+
- name: Pre release
6773
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop'}}
6874
uses: anothrNick/github-tag-action@v1
6975
env:
@@ -72,7 +78,7 @@ jobs:
7278
WITH_V: true
7379
PRERELEASE: true
7480

75-
- name: Patch release
81+
- name: Patch release
7682
if: ${{ github.ref == 'refs/heads/develop' }}
7783
uses: anothrNick/github-tag-action@v1
7884
env:
@@ -81,7 +87,7 @@ jobs:
8187
WITH_V: true
8288
PRERELEASE: true
8389

84-
- name: Minor release
90+
- name: Minor release
8591
if: ${{ github.ref == 'refs/heads/main' }}
8692
uses: anothrNick/github-tag-action@v1
8793
env:

.github/workflows/sec.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
1-
name: Security audit
1+
name: security-audit
2+
23
on:
34
schedule:
45
- cron: '0 0 * * *'
6+
57
jobs:
68
audit:
79
runs-on: ubuntu-latest
810
steps:
9-
- uses: actions/checkout@v1
10-
- uses: actions-rs/audit-check@v1
11+
- name: 📁 Checkout
12+
uses: actions/checkout@v3
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
ref: main
16+
17+
- name: 🧰 Install tools
18+
run: |
19+
sudo apt update \
20+
&& sudo apt install libssl-dev build-essential cmake pkg-config llvm-dev libclang-dev clang libmosquitto-dev libsqlite3-dev -y
21+
22+
- name: 🔐 Run audit
23+
uses: actions-rs/audit-check@v1
1124
with:
1225
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)