mirror of
https://codeberg.org/demostf/api-test.git
synced 2026-06-03 09:34:10 +02:00
bumb dependencies + docker ci
This commit is contained in:
parent
66a1deb3e3
commit
76dba93b66
4 changed files with 555 additions and 679 deletions
27
.github/workflows/docker.yaml
vendored
Normal file
27
.github/workflows/docker.yaml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
name: docker-build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'master'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
tags: demostf/api-test:latest
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
1197
Cargo.lock
generated
1197
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
14
Cargo.toml
14
Cargo.toml
|
|
@ -5,14 +5,14 @@ authors = ["Robin Appelman <robin@icewind.nl>"]
|
|||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
demostf-client = { version = "0.1.5", default-features = false, features = ["rustls-tls"] }
|
||||
sqlx = { version = "0.4", features = ["postgres", "runtime-tokio-rustls"] }
|
||||
dotenv = "0.15.0"
|
||||
color-eyre = "0.5.8"
|
||||
demostf-client = { version = "0.2", default-features = false, features = ["rustls-tls"] }
|
||||
sqlx = { version = "0.5", features = ["postgres", "runtime-tokio-rustls"] }
|
||||
dotenv = "0.15"
|
||||
color-eyre = "0.5"
|
||||
colored = "2"
|
||||
tokio = { version = "0.2", features = ["macros", "rt-core"] }
|
||||
tf-demo-parser = "0.2"
|
||||
bitbuffer = "0.8"
|
||||
tokio = { version = "1", features = ["macros"] }
|
||||
tf-demo-parser = "0.3"
|
||||
bitbuffer = "0.10"
|
||||
|
||||
[profile.dev.package.tf-demo-parser]
|
||||
opt-level = 3
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use bitbuffer::{BitReadBuffer, LittleEndian};
|
|||
use color_eyre::{eyre::WrapErr, Report, Result};
|
||||
use demostf_client::{ChatMessage, Class, Demo, GameType, ListOrder, ListParams, SteamID, Team};
|
||||
use report::{assert_eq, Test};
|
||||
use std::str::FromStr;
|
||||
use std::convert::TryFrom;
|
||||
use tf_demo_parser::{demo::header::Header, DemoParser, MatchState};
|
||||
use tokio::time::Duration;
|
||||
|
||||
|
|
@ -551,10 +551,10 @@ fn verify_demo(api_result: &Demo, header: &Header, state: &MatchState) -> Result
|
|||
.collect::<Vec<_>>();
|
||||
|
||||
players.sort_by(|a, b| {
|
||||
SteamID::from_str(&a.steam_id)
|
||||
SteamID::try_from(a.steam_id.as_str())
|
||||
.unwrap()
|
||||
.account_id()
|
||||
.cmp(&SteamID::from_str(&b.steam_id).unwrap().account_id())
|
||||
.cmp(&SteamID::try_from(b.steam_id.as_str()).unwrap().account_id())
|
||||
});
|
||||
|
||||
let mut api_players = api_result.players.iter().collect::<Vec<_>>();
|
||||
|
|
@ -575,7 +575,7 @@ fn verify_demo(api_result: &Demo, header: &Header, state: &MatchState) -> Result
|
|||
})?;
|
||||
assert_eq(
|
||||
&api_player.user.steam_id,
|
||||
&SteamID::from_str(&player.steam_id).unwrap(),
|
||||
&SteamID::try_from(player.steam_id.as_str()).unwrap(),
|
||||
)
|
||||
.wrap_err_with(|| format!("Failed to compare steam id for {}", api_player.user.name))?;
|
||||
assert_eq(map_team(api_player.team), player.team)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue