Browse Source

Update CI pipeline

develop
Silvestr Predko 1 year ago
parent
commit
9cf553c6bf
3 changed files with 12 additions and 13 deletions
  1. 3
    3
      .github/workflows/cd.yml
  2. 8
    9
      .github/workflows/ci.yml
  3. 1
    1
      web-client/Cargo.toml

+ 3
- 3
.github/workflows/cd.yml View File

21
           node-version: lts/*
21
           node-version: lts/*
22
           registry-url: https://npm.pkg.github.com
22
           registry-url: https://npm.pkg.github.com
23
           scope: "@relayz-io"
23
           scope: "@relayz-io"
24
-      - uses: actions-rs/toolchain@v1
24
+      - name: Install Rust Toolchain
25
+        uses: dtolnay/rust-toolchain@stable
25
         with:
26
         with:
26
-          toolchain: stable
27
-          target: wasm32-unknown-unknown
27
+          targets: "wasm32-unknown-unknown"
28
       - name: Install wasm-pack
28
       - name: Install wasm-pack
29
         run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
29
         run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
30
       - name: Build an npm package
30
       - name: Build an npm package

+ 8
- 9
.github/workflows/ci.yml View File

20
     steps:
20
     steps:
21
       - uses: actions/checkout@v3
21
       - uses: actions/checkout@v3
22
       - name: Install Rust Toolchain
22
       - name: Install Rust Toolchain
23
-        uses: actions-rs/toolchain@v1
23
+        uses: dtolnay/rust-toolchain@nightly
24
         with:
24
         with:
25
-          toolchain: nightly
26
           components: rustfmt
25
           components: rustfmt
26
+      - uses: Swatinem/rust-cache@v2
27
       - name: cargo fmt
27
       - name: cargo fmt
28
-        run: cargo +nightly fmt -- --check
28
+        run: cargo fmt -- --check
29
   clippy:
29
   clippy:
30
     name: clippy
30
     name: clippy
31
     needs: fmt
31
     needs: fmt
33
     steps:
33
     steps:
34
       - uses: actions/checkout@v3
34
       - uses: actions/checkout@v3
35
       - name: Install Rust Toolchain
35
       - name: Install Rust Toolchain
36
-        uses: actions-rs/toolchain@v1
36
+        uses: dtolnay/rust-toolchain@nightly
37
         with:
37
         with:
38
-          toolchain: nightly
39
           components: clippy
38
           components: clippy
39
+      - uses: Swatinem/rust-cache@v2
40
       - name: cargo clippy
40
       - name: cargo clippy
41
-        run: cargo +nightly clippy --workspace --tests -- -D warnings
41
+        run: cargo clippy --workspace --tests -- -D warnings
42
   tests:
42
   tests:
43
     name: tests
43
     name: tests
44
     needs: [clippy, fmt]
44
     needs: [clippy, fmt]
46
     steps:
46
     steps:
47
       - uses: actions/checkout@v3
47
       - uses: actions/checkout@v3
48
       - name: Install Rust Toolchain
48
       - name: Install Rust Toolchain
49
-        uses: actions-rs/toolchain@v1
50
-        with:
51
-          toolchain: stable
49
+        uses: dtolnay/rust-toolchain@stable
50
+      - uses: Swatinem/rust-cache@v2
52
       - name: Run tests for [common-api]
51
       - name: Run tests for [common-api]
53
         run: cargo test --tests --all-features
52
         run: cargo test --tests --all-features
54
   tests-web:
53
   tests-web:

+ 1
- 1
web-client/Cargo.toml View File

29
 serde = { version = "1", default-features = false, features = ["derive"] }
29
 serde = { version = "1", default-features = false, features = ["derive"] }
30
 serde_json = { version = "1", default-features = false }
30
 serde_json = { version = "1", default-features = false }
31
 uuid = { version = "1.3", features = ["v4", "serde", "js"] }
31
 uuid = { version = "1.3", features = ["v4", "serde", "js"] }
32
-url = "2.2"
32
+url = "2.3"
33
 wasm-bindgen = { version = "0.2", features = ["serde-serialize"] }
33
 wasm-bindgen = { version = "0.2", features = ["serde-serialize"] }
34
 wasm-bindgen-futures = "0.4"
34
 wasm-bindgen-futures = "0.4"
35
 web-sys = { version = "0.3", features = ["console"] }
35
 web-sys = { version = "0.3", features = ["console"] }

Loading…
Cancel
Save