generated from security-union/yew-actix-template
-
Notifications
You must be signed in to change notification settings - Fork 126
76 lines (65 loc) · 1.9 KB
/
cargo-test.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
66
67
68
69
70
71
72
73
74
75
76
# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
on: [pull_request]
name: cargo test
env:
ACTIX_PORT: 8080
UI_ENDPOINT: localhost:80
OAUTH_CLIENT_ID: blah
OAUTH_AUTH_URL: blah
OAUTH_TOKEN_URL: blah
OAUTH_CLIENT_SECRET: blah
OAUTH_REDIRECT_URL: http://localhost:8080/login/callback
RUST_LOG: info
DATABASE_URL: postgres://postgres:docker@postgres:5432/actix-api-db?sslmode=disable
ACTIX_UI_BACKEND_URL: yeet
LOGIN_URL: yeet
WEBTRANSPORT_HOST: yeet
ENABLE_OAUTH: false
WEBTRANSPORT_ENABLED: true
E2EE_ENABLED: true
jobs:
test-api:
name: cargo test and lint api
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.70
with:
components: clippy, rustfmt
- run: cd actix-api && cargo clippy -- --deny warnings
- run: cd actix-api && cargo fmt --check
- run: cd actix-api && cargo test
lint-ui:
name: cargo lint ui
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.65
with:
components: clippy, rustfmt
toolchain: nightly-2023-01-27
- run: rustup target add wasm32-unknown-unknown
- run: cd yew-ui && cargo fmt --check
test-ui:
name: UI Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
working-directory: ./yew-ui
- name: Install nightly toolchain and wasm32-unknown-unknown
uses: actions-rs/toolchain@v1
with:
profile: minimal
target: wasm32-unknown-unknown
toolchain: nightly-2023-01-27
override: true
- name: Install wasm-bindgen-cli
uses: jetli/wasm-bindgen-action@v0.2.0
with:
version: 'latest'
- name: Run cargo test
run: |
cd yew-ui
cargo test