-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (67 loc) · 1.9 KB
/
Copy pathtest.yml
File metadata and controls
84 lines (67 loc) · 1.9 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
name: "Test Rust"
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
defaults:
run:
shell: bash -l {0}
env:
CARGO_REGISTRIES_CIPHERSTASH_TOKEN: "Token ${{ secrets.CLOUDSMITH_CARGO_TOKEN }}"
RUSTFLAGS: "-D warnings"
jobs:
test:
runs-on: ubuntu-latest
services:
dynamo:
image: amazon/dynamodb-local
ports:
- 8000:8000
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
- name: "Run tests"
run: cargo test --all-targets
env:
CS_WORKSPACE_ID: ${{ secrets.CS_WORKSPACE_ID }}
CS_CLIENT_ACCESS_KEY: ${{ secrets.CS_CLIENT_ACCESS_KEY }}
CS_WORKSPACE_CRN: ${{ secrets.CS_WORKSPACE_CRN }}
CS_CLIENT_ID: ${{ secrets.CS_CLIENT_ID }}
CS_CLIENT_KEY: ${{ secrets.CS_CLIENT_KEY }}
CS_TENANT_KEYSET_ID_1: ${{ secrets.CS_TENANT_KEYSET_ID_1 }}
CS_VITUR_IDP_HOST: "https://ap-southeast-2.aws.auth.viturhosted.net"
AWS_ACCESS_KEY_ID: cryptonamo
AWS_SECRET_ACCESS_KEY: cryptonamo
AWS_REGION: ap-southeast-2
RUST_BACKTRACE: full
- name: "Run doc tests"
run: cargo test --doc
env:
RUST_BACKTRACE: full
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: rustfmt
- run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: rustfmt
- run: cargo clippy --all --no-deps --all-features --tests