-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (43 loc) · 1.16 KB
/
ci.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
name: Continuous Integration
on:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
clippy:
name: Clippy
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run clippy
run: cargo clippy --all-features --all-targets
rustfmt:
name: Format
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
toolchain: nightly
- name: Check code formatting
run: cargo +nightly fmt -- --check
test:
name: Test
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create .env
run: |
touch .env
echo "API_ROOT=${{ secrets.ENV_DEV__API_ROOT }}" >> .env
echo "CLIENT_ID=${{ secrets.ENV_DEV__OAUTH_CLIENT_ID }}" >> .env
echo "CLIENT_SECRET=${{ secrets.ENV_DEV__OAUTH_CLIENT_SECRET }}" >> .env
- name: Test
run: cargo test