generated from security-union/yew-actix-template
-
Notifications
You must be signed in to change notification settings - Fork 126
74 lines (62 loc) · 1.78 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
# 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
jobs:
test-api:
name: API Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
working-directory: ./actix-api
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
continue-on-error: false # WARNING: only for this example, remove it!
with:
command: test
args: --manifest-path ./actix-api/Cargo.toml
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-2022-10-21
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