-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (57 loc) · 1.57 KB
/
ci.yaml
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
name: Continuous integration
on: [pull_request, push]
env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features -- -D warnings
test:
name: Run tests
runs-on: ubuntu-latest
needs: lint
services:
redis:
image: redis:7.2.4-alpine
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# By default actions/checkout checks out a merge commit. Check out the PR head instead.
# https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
ref: ${{ github.event.pull_request.head.sha }}
- name: Install latest stable release
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Run tests
uses: actions-rs/cargo@v1
env:
IS_DEV: false
HOST: localhost
PORT: 8080
CDN_SERVER_URL: https://cdn.storiny.com
RPC_SERVER_URL: 127.0.0.1:50051
RPC_SECRET_TOKEN: x
REDIS_HOST: localhost
REDIS_PORT: 6379
SENTRY_DSN: x
with:
command: test