From 675fbde56b0b3c61e15b91c9bd70fe6fa586aa0b Mon Sep 17 00:00:00 2001 From: Lazy Panda Date: Fri, 13 Sep 2024 16:55:37 +0800 Subject: [PATCH] fix workflow; --- .github/workflows/release.yml | 10 +++++----- tests/src/lib.rs | 21 ++++++++++++++------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03fe974..c056451 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cargo/bin/ @@ -70,7 +70,7 @@ jobs: - name: Upload artifact (Linux) if: runner.os == 'Linux' && matrix.arch == 'x86_64' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: linux-x86_64 path: | @@ -78,7 +78,7 @@ jobs: - name: Upload artifact (Linux) if: runner.os == 'Linux' && matrix.arch == 'aarch64' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: linux-x86_64 path: | @@ -86,7 +86,7 @@ jobs: - name: Upload artifact (Windows) if: runner.os == 'Windows' && matrix.arch == 'x86_64' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: windows-x86_64 path: | @@ -100,7 +100,7 @@ jobs: uses: actions/checkout@v3 - name: Download All Artifacts - uses: actions/download-artifact@v4.1.7 + uses: actions/download-artifact@v4 with: path: artifacts - diff --git a/tests/src/lib.rs b/tests/src/lib.rs index 2ca5fbc..35f93e1 100644 --- a/tests/src/lib.rs +++ b/tests/src/lib.rs @@ -1,22 +1,29 @@ use base64::prelude::*; use bytes::BytesMut; use once_cell::sync::Lazy; -use stun::attribute::{ - ChannelNumber, Data, ErrKind, ErrorCode, Lifetime, MappedAddress, Realm, ReqeestedTransport, - ResponseOrigin, Transport, UserName, XorMappedAddress, XorPeerAddress, XorRelayedAddress, +use stun::{ + attribute::{ + ChannelNumber, Data, ErrKind, ErrorCode, Lifetime, MappedAddress, Realm, + ReqeestedTransport, ResponseOrigin, Transport, UserName, XorMappedAddress, XorPeerAddress, + XorRelayedAddress, + }, + Decoder, Kind, MessageReader, MessageWriter, Method, Payload, }; use rand::seq::SliceRandom; -use stun::{Decoder, Kind, MessageReader, MessageWriter, Method, Payload}; use tokio::{net::UdpSocket, runtime::Runtime}; use turn_server::{ config::{self, *}, startup, }; -use std::net::{IpAddr, Ipv4Addr, SocketAddr}; -use std::sync::Arc; -use std::{collections::HashMap, thread::sleep, time::Duration}; +use std::{ + collections::HashMap, + net::{IpAddr, Ipv4Addr, SocketAddr}, + sync::Arc, + thread::sleep, + time::Duration, +}; static RUNTIME: Lazy = Lazy::new(|| Runtime::new().unwrap());