-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (39 loc) · 1.17 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
on: [push, pull_request]
name: CI
jobs:
test:
name: Test
runs-on: ubuntu-20.04
timeout-minutes: 25
steps:
- uses: actions/checkout@v3
- run: cp ci/Cargo.lock ci/rust-toolchain.toml .
- uses: Swatinem/rust-cache@v2
- run: cargo build --tests --locked
- id: setup_env
run: ./ci/testenv/setup.sh
env:
MISSKEY_IMAGE: 'misskey/misskey:12.75.1'
MISSKEY_ID: aid
- run: cargo test --features 12-75-0
timeout-minutes: 15
env:
TEST_API_URL: http://localhost:3000/api/
TEST_WEBSOCKET_URL: ws://localhost:3000/streaming
TEST_ADMIN_TOKEN: ${{ steps.setup_env.outputs.admin_token }}
TEST_USER_TOKEN: ${{ steps.setup_env.outputs.user_token }}
fmt:
name: Rustfmt
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- run: cp ci/Cargo.lock ci/rust-toolchain.toml .
- run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- run: cp ci/Cargo.lock ci/rust-toolchain.toml .
- uses: Swatinem/rust-cache@v2
- run: cargo clippy -- -D warnings