mirror of
https://github.com/TaKO8Ki/awesome-alternatives-in-rust
synced 2024-11-10 06:04:13 +00:00
parent
ea774e4053
commit
5008d092e3
4 changed files with 12 additions and 8 deletions
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
@ -63,7 +63,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache cargo registry
|
||||
if: runner.os != 'macOS'
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/registry
|
||||
|
@ -74,10 +73,14 @@ jobs:
|
|||
path: ~/.cargo/git
|
||||
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache cargo build
|
||||
if: runner.os != 'macOS'
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: target
|
||||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache results
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: results
|
||||
key: ${{ runner.os }}-results-${{ hashFiles('**/results.yml') }}
|
||||
- name: Run Tests
|
||||
run: cargo run
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
## `ls`
|
||||
|
||||
* [ogham/exa](https://github.com/ogham/exa) — A replacement for 'ls'
|
||||
* [Peltoche/lsd](https://github.com/Peltoche/lsd) — An ls with a lot of pretty colors and awesome icons
|
||||
* [ogham/exa](https://github.com/ogham/exa) - A replacement for 'ls'
|
||||
* [Peltoche/lsd](https://github.com/Peltoche/lsd) - An ls with a lot of pretty colors and awesome icons
|
||||
|
||||
## `cat`
|
||||
|
||||
|
|
1
results/.gitignore
vendored
Normal file
1
results/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
results.yml
|
|
@ -248,7 +248,7 @@ async fn main() -> Result<(), Error> {
|
|||
let parser = Parser::new(&markdown_input);
|
||||
|
||||
let mut used: BTreeSet<String> = BTreeSet::new();
|
||||
let mut results: Results = fs::read_to_string("results/results.yaml")
|
||||
let mut results: Results = fs::read_to_string("results/results.yml")
|
||||
.map_err(|e| format_err!("{}", e))
|
||||
.and_then(|x| serde_yaml::from_str(&x).map_err(|e| format_err!("{}", e)))
|
||||
.unwrap_or(Results::new());
|
||||
|
@ -297,7 +297,7 @@ async fn main() -> Result<(), Error> {
|
|||
for link in old_links {
|
||||
results.remove(link).unwrap();
|
||||
}
|
||||
fs::write("results/results.yaml", serde_yaml::to_string(&results)?)?;
|
||||
fs::write("results/results.yml", serde_yaml::to_string(&results)?)?;
|
||||
|
||||
let mut not_written = 0;
|
||||
let mut last_written = Local::now();
|
||||
|
@ -345,12 +345,12 @@ async fn main() -> Result<(), Error> {
|
|||
not_written += 1;
|
||||
let duration = Local::now() - last_written;
|
||||
if duration > Duration::seconds(5) || not_written > 20 {
|
||||
fs::write("results/results.yaml", serde_yaml::to_string(&results)?)?;
|
||||
fs::write("results/results.yml", serde_yaml::to_string(&results)?)?;
|
||||
not_written = 0;
|
||||
last_written = Local::now();
|
||||
}
|
||||
}
|
||||
fs::write("results/results.yaml", serde_yaml::to_string(&results)?)?;
|
||||
fs::write("results/results.yml", serde_yaml::to_string(&results)?)?;
|
||||
println!("");
|
||||
let mut failed: u32 = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue